Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Anonymous
Not applicable
I will soon be migrating a lot of Windows XP to Windows 7 as I did from Windows 2000 to XP, after looking at USMT4 documentation I found it to support shadow copy. This nice switch (/vsc) made me think it was safe to do a migration this way. So I've made an action to make the migration of a Windows XP machine to Windows 7. In migrate.bat I've added some "intelligence" so it knows if it's a backup or restore, when the user migrates to a new computer before running migrate.bat again I have to rename the folder of the computername. Take care, maybe some environment variables are specific of my environment...

Action:
cmd.exe /k {actionpath}psexec.exe \\{computer} -c -f -u %userdomain%\%USERNAME% \\server\share4$\migrate.bat


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
0 REPLIES 0

Archive

This board contains archived posts from the retired Lansweeper Forum and Insiders Community.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now