Lansweeper logo
Home Download Features Demo Buy now Help Support forum
 
    Most requested support articles:
  Lansweeper troubleshooting guide.
  The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
  WMI Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
  How to configure the windows firewall using group policies.
  Support:  
 support@lansweeper.com  
Skype: Lansweeper  
  Mo-Fri 9h-17h CET  
Welcome Guest Search | Active Topics | Log In | Register

Tag as favorite
USMT4 (User state migration tool) XP> W7
BullGates
#1 Posted : Wednesday, July 14, 2010 5:04:32 PM

Rank: Premium user

Groups: Member, Premium Users
Posts: 203
Location: PT
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:
Code:
cmd.exe /k {actionpath}psexec.exe \\{computer} -c -f -u %userdomain%\%USERNAME% \\server\share4$\migrate.bat


migrate.bat:
Code:
@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
Users browsing this topic
Guest
Tag as favorite
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Contact: E-mail Lansweeper - Skype : Lansweeper
Copyright 2004 - 2011 © Hemoco bvba