Building a USB Drive to Store USMT 4.0 Files and Simple Commands
To follow the steps in this procedure, you must have already installed Windows 7 by using a DVD or similar media on an existing Windows XP computer. First, you compile the components needed to create an external USB drive with the components used to carry out the migration process. You use this USB drive to migrate files from Windows.old to the appropriate full operating system locations, and you can use the USB for both Windows 7 and Windows Vista. User files are not copied to the USB drive, so you can use USB drive with at least 50 MB of free space.
To build a USB drive for storage
Download the Windows Automated Installation Kit ISO for Windows 7.
Burn the Windows AIK ISO file to a DVD and follow the installation instructions.
Once you have installed Windows AIK, copy C:\Program Files\Windows AIK\Tools\USMT\ to an external USB drive. Your USB drive must have the USMT folder in the root directory with amd64 and x86 subfolders.
Create a batch file for use with x86 file migrations. Open Notepad and copy the following text into a new file:
@ECHO OFF If exist D:\USMT\*.* xcopy D:\USMT\*.* /e /v /y C:\Windows\USMT\ If exist E:\USMT\*.* xcopy E:\USMT\*.* /e /v /y C:\Windows\USMT\ If exist F:\USMT\*.* xcopy F:\USMT\*.* /e /v /y C:\Windows\USMT\ If exist G:\USMT\*.* xcopy G:\USMT\*.* /e /v /y C:\Windows\USMT\ If exist H:\USMT\*.* xcopy H:\USMT\*.* /e /v /y C:\Windows\USMT\ If exist I:\USMT\*.* xcopy I:\USMT\*.* /e /v /y C:\Windows\USMT\ If exist J:\USMT\*.* xcopy J:\USMT\*.* /e /v /y C:\Windows\USMT\ If exist K:\USMT\*.* xcopy K:\USMT\*.* /e /v /y C:\Windows\USMT\ Cd c:\windows\usmt\x86 scanstate.exe c:\store /v:5 /o /c /hardlink /nocompress /efs:hardlink /i:MigApp.xml /i:MigDocs.xml /offlineWinOld:c:\windows.old\windows loadstate.exe c:\store /v:5 /c /lac /lae /i:migapp.xml /i:migdocs.xml /hardlink /nocompress :EOF
Batch File Commands
The first section of the batch file determines where USMT files are kept and copies those files to the C:\Windows directory. The second section changes the directory to the newly created USMT directory. The scanstate.exe command creates a hard-link migration store at C:\store from the windows.old directory, and the loadstate.exe command remaps the hard-link files to their appropriate locations within Windows 7 or Windows Vista. You must run the batch file and the USMT folder as an administrator on the computer when performing the migration. For AMD64 bit migrations, you can modify the batch file by changing
Cd c:\windows\usmt\x86
toCd c:\windows\usmt\amd64
. USMT supports moving from 32-bit Windows XP to 64-bit versions of Windows 7 or Windows Vista.Save the batch file as Migrate.bat on the USB drive.