‎07-14-2010 07:04 PM
cmd.exe /k {actionpath}psexec.exe \\{computer} -c -f -u %userdomain%\%USERNAME% \\server\share4$\migrate.bat
@echo off
if not defined computername (echo ERROR: variable comutername not defined! & goto end)
set migrationpath="\\server\share$\%computername%"
set aplpath=\\server\share$\USMT
if exist %migrationpath%\restored goto error
if exist %migrationpath% goto restore
"%aplpath%\scanstate" %migrationpath% /config:"%aplpath%\config.xml" /i:"%aplpath%\ExcludeMP3.xml" /i:"%aplpath%\IncludePST.xml" /i:"%aplpath%\ExcludeDaten.xml" /i:"%aplpath%\MigUser.xml" /i:"%aplpath%\MigApp.xml" /i:"%aplpath%\MigDocs.xml" /ue:* /ui:domain\* /uel:180 /c /localonly /l:\\server\share$\logs\%computername%_backup.log /efs:skip /vsc
goto end
:restore
"%aplpath%\loadstate" %migrationpath% /config:"%aplpath%\config.xml" /i:"%aplpath%\miguser.xml" /i:"%aplpath%\migapp.xml" /i:"%aplpath%\migsys.xml" /ue:domain\user1 /ue:domain\user2 /ue:domain\user3 /l:\\server\share$\logs\%computername%_restore.log
mkdir %migrationpath%\restored
goto end
:error
echo Restore already done, please recheck or delete folder %migrationpath%\restored if you really wish to restore again
:end
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now