Share via


Step-by-Step: Basic Windows Migration using USMT for IT Professionals

Applies To: Windows 7

The Windows® User State Migration Tool (USMT) 4.0 is designed to help IT professionals migrate files and settings to the Windows® 7 operating system. USMT 4.0 is a Microsoft application intended for administrators who are performing large-scale automated deployments. For deployment to a small number of computers or for individually customized deployments, you can use Windows Easy Transfer. For more information, see Windows 7 Upgrade and Migration Guide.

This step-by-step guide to Windows migration for IT pros provides a basic example of how to migrate files and settings from Windows XP to Windows 7 using USMT 4.0. (You can also migrate files and settings from a computer running Windows Vista®.) At the end of this process, you will have used the ScanState and LoadState tools to complete an end-to-end migration. You can also customize your migration by editing configuration files used by these tools. For a comprehensive description of all of the tools and configuration files, see the User State Migration Tool (USMT) 4.0 User's Guide (Usmt.chm) downloaded with the Windows Automated Installation Kit (Windows AIK) or this Microsoft Web site.

In this example, you gather data from a source computer running Windows XP, create a migration store using the default settings in ScanState, install Windows 7 on a new or newly repartitioned computer, and then apply data from the migration store.

This process includes:

Step 1: Gather data using the ScanState tool

Step 2: Install Windows 7

Step 3: Apply data using the LoadState tool

Requirements

To complete this scenario, you need the following:

  • Windows 7 product DVD disc

  • Windows Automated Installation Kit (Windows AIK) DVD disc

    You can download the Windows AIK .iso file from this Microsoft Web site and burn the .iso file onto a blank DVD disc.

  • A source computer

    A source computer requires a network adapter, a working network environment, and a DVD-ROM drive. This guide uses a source computer running Windows XP. However, you can also use a source computer running Windows Vista. If you choose to use this guide with Windows Vista, the interface will differ slightly from that of Windows XP, and you may have to modify some of the steps for actions on that operating system, but the USMT syntax will remain the same.

Note

If you do not use the optional destination computer, the source computer will be reformatted for the purposes of this scenario. Create a backup of the source computer before testing your migration with USMT.

  • Network connectivity

  • A technician computer

    A technician computer can be any computer on which you will install the Windows AIK. The technician computer must be running Windows Server® 2003, Windows Vista, or Windows 7. This computer also requires a DVD-ROM drive. After you have installed the Windows AIK on the technician computer, you can copy the USMT to other computers in your organization.

  • Optional: a destination computer

    A destination computer is the computer onto which you intend to migrate files and settings. This computer requires a network adapter, a working network environment, and a DVD-ROM drive.

    For this example, you can reuse the source computer as your destination computer. After you create a migration store on a server, you can then reformat the hard drive of the source computer, returning it to a blank state. The source computer will then become your destination computer.

  • Optional: installation software for applications for which you will migrate files and settings

Note

The application version that is installed on the destination computer should be the same version as the one on the source computer. USMT does not support migrating the settings for an older version of an application to a newer version. The exception to this is Microsoft® Office applications, which USMT can often migrate from an older version to a newer version.

Step 1: Gather Data Using the ScanState Tool

There are two migration scenarios. Migrating to a new operating system on a single computer is known as PC refresh. Migrating to a separate destination computer is known as PC replacement. For more information about PC refresh and PC replacement, see Common Migration Scenarios.

In most PC-refresh scenarios, you can perform a hard-link migration. Use of a hard-link migration store drastically improves migration performance and significantly reduces hard-disk space usage. For more information about hard-link migrations, see Hard-Link Migration Store.

In some PC-refresh scenarios, however, such as repartitioning the drive, you cannot use a hard-link migration store. In this case, you must create a compressed or uncompressed migration store instead. This is called a PC-replacement scenario and is similar to the steps you use when migrating files and settings to a new computer. In this step-by-step guide, you will create a compressed migration store on a server that can be used in either a PC-refresh or PC-replacement scenario.

Install the USMT

You can install the Windows AIK on any computer running a supported operating system such as Windows Vista or Windows 7. After the Windows AIK is installed, you can copy USMT files and tools to other computers in your organization.

  1. On a computer running an operating system that is supported by Windows AIK, insert the Windows AIK DVD into the DVD-ROM drive.

    The Setup program automatically starts.

Note

If the Setup program does not start automatically, in Windows Explorer, browse to the DVD drive containing the Windows AIK DVD, and then click StartCD.exe. Click Windows AIK Setup to begin the installation

  1. Follow the online instructions.

  2. Copy all of the contents of C:\Program Files\Windows AIK\Tools\USMT\<architecture> to a network share or USB port. <architecture> can be either x86 or amd64. For example, at a command prompt, type:

    xcopy c:\Program Files\Windows AIK\Tools\USMT\x86 \\fileserver\USMTx86
    
  3. Copy the USMT files and tools to the source computer. For example, on the source computer, at a command prompt, type:

    xcopy \\fileserver\USMTx86 c:\USMT
    

Note

Only the ScanState tool is supported on Windows XP for USMT 4.0. Other USMT and Windows AIK tools, such as LoadState and Windows System Image Manager (Windows SIM), are not supported on Windows XP. To use the Windows AIK to create an answer file or a customized Windows image for deployment, you must install the Windows AIK on a computer running a supported operating system.

Optional: Create a Test Account to Migrate

If you are using a source computer that has not been customized by a user to include personal files and modifications such as desktop wallpaper, you should create a test account in order to test and verify a successful migration.

To create a local test account on a Windows XP computer that is not joined to a domain

  1. Click Start, click Control Panel, click User Accounts, and then click Create a new account.

  2. Type USMT Tester, and then click Create Account.

  3. Click Close.

To create a local test account on a Windows XP computer that is joined to a domain

  1. Click Start, click Control Panel, and then click User Accounts.

  2. In the User Account window, click the Advanced tab.

  3. Under Advanced User Management, click Advanced.

  4. In the Local Users and Groups pane, click Users.

  5. On the Action menu, click New User.

  6. Type USMT Tester in the User name: text box, type a password that you will remember, or make a note of it, click the User must change password at next logon check box to clear it, and then click Create.

  7. Click Close.

Optional: Add files and Settings to a Test Account

Make any other changes to the USMT Tester account that you would like to test during the migration. For example:

  • Copy files from a USB flash drive (UFD) or a network share to the My Documents folder for the test account. You can use .txt files or a sample of file types you would like to migrate. For more information, see What Does USMT Migrate?.

  • Copy or create test files on the C:\ drive.

  • Set a custom desktop wallpaper. Built-in wallpaper images, such as Tulips.jpg on Windows XP, will not migrate. Instead, save a new image file to the source computer to use as wallpaper.

  • Change the font color in the command-prompt application.

  • Map a network drive.

  • Set the home page in Internet Explorer®.

Optional: Preview What USMT Will Migrate

In USMT 4.0, the MigXmlHelper.GenerateDocPatterns function can be used to automatically find user documents on a computer without authoring extensive custom migration .xml files. This function is included in the MigDocs.xml sample file downloaded with the Windows AIK.

To preview what USMT will migrate

  1. Click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as.

  2. Select an account with administrator privileges, supply a password, and then click OK.

  3. At the command prompt, type:

    cd /d <USMTpath>
    scanstate.exe /genmigxml:<filepath.xml>
    

    Where <USMTpath> is the location on your source computer where you have saved the USMT files and tools, and <filepath.xml> is the full path to a file where you can save the report. For example, type:

    cd /d c:\USMT
    scanstate.exe /genmigxml:"C:\Documents and Settings\USMT Tester\Desktop\genMig.xml"
    
  4. Open the file that ScanState generated at the location you specified. This guide shows the patterns that you will use in the migration when you run ScanState and specify the MigDocs.xml sample file in the command-line options.

  5. Find the component element for USMT Tester in the .xml file. It will look like this:

    <component type="Documents" context="STRESSMARMOT\USMT Tester" defaultSupported="Yes">
    

    Review the folders and file patterns that will be migrated for this account. For example, the following line shows that all files in the USMT Tester\My Documents folder will be migrated:

    <pattern type="File">c:\documents and settings\usmt tester\my documents\*[*]</pattern>
    

For more information on what USMT migrates and how to determine what types of files and settings are best to migrate for your organization, see Plan Your Migration.

For more information about customizing configuration files, see Customize USMT XML Files.

Run ScanState to Create a Migration Store on the Server

By default, the ScanState tool will create a compressed migration store. This guide uses the default compressed migration store that is applicable to both PC-refresh and PC-replacement scenarios. For most PC-refresh scenarios, however, you can also use a Hard-Link Migration Store, which improves performance. For more information, see Hard-Link Migration Store.

To create a migration store on a server

  1. Log on to the source computer as an account that has administrator privileges. This account should also have permissions to the network share where you will create your migration store.

  2. Open a command prompt. Click Start, click All Programs, click Accessories, and then click Command Prompt.

    Run ScanState on the source computer to collect files and settings. Type:

    cd /d <USMTpath>
    scanstate <StorePath> /i:migdocs.xml /i:migapp.xml /v:13 /l:<logFilePath>
    

    Where <USMTpath> is the location on your source computer where you have saved the USMT files and tools. <StorePath> is the full path to a folder on a network server where you can create the migration store, and <logFilePath> is the full or relative path to a file where you can save the ScanState log information. For example, type:

    cd /d c:\USMT
    scanstate \\fileserver\migration\mystore /i:migdocs.xml /i:migapp.xml /v:13 /l:scan.log
    
  3. Optional: review the ScanState log. For help with USMT errors, see Troubleshooting.

Step 2: Install Windows 7

After you create a migration store on a server, you will install Windows 7 and load the files and settings from that migration store onto the destination computer. You can reformat the source computer (PC refresh) and use it as your destination computer, or you can use an additional computer (PC replacement).

You must install Windows 7 and any applications for which you will migrate files and settings onto your destination computer.

To install Windows 7

  1. If your computer contains user data, back up this data before reformatting.

  2. To start Windows 7 Setup, insert the Windows 7 DVD while running Windows, choose your language options, and then click Install Now. If the autorun program does not open the Install Windows screen, browse to the root folder of the DVD and double-click setup.exe.

Note

You can use an unattended answer file to customize your Windows 7 deployment. For more information, see Step-by-Step: Basic Windows Deployment for IT Professionals or the Windows AIK User’s Guide.

  1. Read and accept the Microsoft Software License Terms. Click I accept the License Terms (required to use Windows), and then click Next. If you click I decline (cancel installation), Windows 7 Setup will exit.

  2. Click Custom (advanced).

  3. On the Where do you want to install Windows? screen, click Drive options (advanced).

  4. Click a partition, and then click Delete. Click OK if you want to delete the partition and any data on it.

  5. If there are additional partitions, repeat step 6 for each partition.

  6. Select the disk listed as unallocated space, and then click New.

  7. Enter a partition size, or click Apply.

  8. Click OK. Windows will create the new partition as well as a system partition.

  9. Select the new partition, and then click Format. Click OK if you want to reformat the partition and delete any data on it.

  10. Click Next.

    Windows 7 Setup will proceed without further interaction.

Install Applications

Although it is not always necessary, it is a best practice to install applications before loading files and settings from your migration store.

To install applications

  1. Install all user applications on the destination computer. The application version that is installed on the destination computer should be the same version as the one on the source computer. USMT does not support migrating the settings for an older version of an application to a newer version. The exception to this is Microsoft® Office, which USMT can migrate from an older version to a newer version.

    For more information about what applications and settings are supported in USMT 4.0, see What Does USMT Migrate?.

  2. Close all applications. If some applications are running when you run LoadState, USMT might not migrate all of the specified data. For example, if Microsoft Office Outlook® is open, USMT might not migrate .pst files, which, for example, store a user's local messages and calendar events.

Step 3: Apply Data Using the LoadState Tool

To apply migrated data to your hard drives, you connect the computer to your network, install USMT, and then run LoadState.

To connect the computer to your network

  1. Click Start, right-click My Computer, and then click Properties.

  2. Under Computer name, domain, and workgroup settings, click Change Settings.

  3. In the System Properties window, click Network ID.

  4. Use the Join a Domain or workgroup Wizard to connect to your local area network.

To install the USMT

  • Copy the USMT files and tools to the destination computer from the UFD or network share where you have saved them. For example, on the destination computer, at a command prompt, type:

    xcopy \\fileserver\USMTx86 c:\USMT
    

To run LoadState

  1. Log on to the destination computer as an account that has administrator privileges. This account should also have permissions to the network share where you created your migration store.

  2. Open a command prompt. Click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as Administrator.

  3. Click Yes to open the command prompt.

  4. Run LoadState on the destination computer. Specify the same set of .xml files that you specified when using ScanState.

    cd /d <USMTpath>
    loadstate <storePath> /i:migdocs.xml /i:migapp.xml /lac /lae /v:13 /l:<logFilePath>
    

    Where <USMTpath> is the location on your source computer where you have saved the USMT files and tools, <storePath> is the full path to a folder on a network server where you can create the migration store, and <logFilePath> is the full or relative path to a file where you can save the ScanState log information. For example, type:

    cd /d c:\USMTloadstate \\fileserver\migration\mystore /i:migdocs.xml /lac /lae /i:migapp.xml /v:13 /l:load.log
    

Note

The /lac and /lae options specify that local accounts, such as the USMT Tester account you may have created in step 1, will be created and enabled on the destination computer. Local account passwords will not be migrated. You can specify a new password for the account in the LoadState command line. If you do not specify a password, the password for the account will be blank by default. For more information, see LoadState Syntax.

  1. Optional: review the LoadState log file. For help with USMT errors, see Troubleshooting.

After the computer has been restarted, you can verify that the USMT Tester account was successfully migrated and that the test documents are present on the new computer. You can log on to the USMT Tester account and verify the migration of any of the customizations you made in step 1.

Next Steps

You can learn more about customizing your migration from the User State Migration Tool (USMT) 4.0 User's Guide (Usmt.chm) installed with the Windows AIK or at this Microsoft Web site.

See Also

Concepts

Windows 7 Upgrade and Migration Guide

Other Resources

User State Migration Tool 4.0
Windows Automated Installation Kit for Windows 7