The Microsoft User State Migration Tool is, as its name suggests, a tool set that can be used during deployments to migrate user's documents and settings. When combined with SmartDeploy Enterprise you can install Windows 7 over a users Windows XP instance while keeping all of their files and settings. In this guide we will demonstrate how to combine USMT with SmartDeploy Enterprise and complete a Windows XP to Windows 7 migration.
For this example we will be doing what is referred to as a Hard-Link migration. A Hard-Link migration is defined as a migration where all user state information is maintained on the target computer while the old operating system is removed and a new operating system is installed. This type of deployment is best suited for a computer refresh scenario as all information is maintained on the users PC. Because all of the information is maintained on the user's computer you will not need to worry about coping the users state to a network resource, thus saving time in the overall deployment.
This entry is meant to guide you through an entire deployment, from creating an image, to deploying the image with the users state.
Before You Begin
Before beginning this guide it is assumed that you have a few prerequisites in place. SmartDeploy Enterprise will need to be installed on your technician machine. You will also need access to USMT version 4.0, these files are available within Microsoft's Windows Automated Install Kit (AIK) which can be downloaded here. Please note that this example is using Windows XP (x86) and Windows 7 (x86). If you're trying to migrate to or from a 64bit version of Windows the steps may differ. If installing Windows 7 (x64) please add the amd64 folder of USMT to the virtual reference machine. If migrating from Windows XP x64 please set the following environment variable in the USMT batch file created below, Set MIG_OFFLINE_PLATFORM_ARCH=64.
Creating Virtual Reference Machine
In a normal scenario Hard-Link migration operating system deployment is done by installing Windows 7 over Windows XP protecting the disk partitioning. Due to this, you will need to install Windows 7 to one partition to match that of your Windows XP instance. In the case of SmartDeploy you will install Windows 7 to one partition in a virtual machine, then capture the image to a WIM file. The following steps will take you through the process of installing Windows 7 to one partition.
- Create a New Virtual Machine; this will vary based on the virtualization software used in your environment.
- Boot the new virtual machine using Windows 7 install media.
Once boot, the Install Windows page will appear. Press Shift + F10 to open a Command Prompt.
From the Command Prompt enter the following commands followed by pressing the Enter key, then close the Command Prompt.
- Select Disk 0
- Clean (Note this will destroy any data on the virtual machine)
- Create Partition Primary
[*]From the Localization page accept the defaults and click Next.
[*]Click Install Now.
[*]You will receive a message stating Setup is Starting. When the EULA page is displayed select I accept the license terms and click Next.
[*]When prompted for installation type click Custom.
[*]On the Where do you want to install Windows page, ensure Disk 0 Partition 1 is selected and click Next.
[*]Wait for the installation to finish then proceed to the next section.
Adding USMT to Virtual Reference Machine
Next, You will need to add the USMT components to your virtual reference machine.
- Download and install Windows AIK on your technician computer.
- If your virtual reference machine is not already started, please start it now.
- From your technician computer navigate to c:\Program Files\Windows AIK\Tools\USMT \x86 and copy the contents of this folder to c:\USMT on your virtual reference machine.
- Add any other applications or settings that are needed for your environment.
- Shutdown your virtual reference machine.
- You can now use the Capture Wizard to capture the master image as described in the SmartDeploy Enterprise User’s Guide.
Creating Batch File to Run ScanState
In this section we will create a batch file to run the ScanState tool of USMT. This will scan the Windows XP install and copy the users state to the specified store.
Open Notepad.exe by clicking Start>All Programs>Accessories>Notepad.
From Notepad enter the following information one line at a time.
- Set USMT_WORKING_DIR=c:\temp
- %SmartDeploy_Media%\z\usmt\x86\ScanState.exe C:\backup /nocompress /Hard-Link /offlinewindir:c:\windows /all /i:%SmartDeploy_Media%\z\usmt\x86\migdocs.xml /i:%SmartDeploy_Media%\z\usmt\x86\migapp.xml /i:%SmartDeploy_Media%\z\usmt\x86\miguser.xml /l:x:\windows\temp\ScanState.log
Note that C:\Backup is where the user state will be saved and loaded from once the deployment is complete. It is a local folder on the target machine that will be protected during deployment, using SmartDeploy. For more information on the commands in this section please check the USMT User’s Guide.
[*]When finished click File>Save As. Navigate to C:\Program Files\Windows AIK\Tools\USMT. Enter USMT.BAT for the file name, change Save as type to All files, click Save.