Step-by-Step: Offline Migration with USMT 4.0

Applies To: Windows 7

You can migrate files and settings while the operating system is offline, by using Windows® User State Migration Tool (USMT) 4.0. For an offline migration with USMT, you do not need to log onto the computer that you are deploying Windows on.

When the operating system is offline, hardware resources and files are more readily accessible by ScanState and other USMT tools. Migrating offline may increase performance on older computers that have limited hardware resources and numerous software applications. It also helps avoid conflicts where a file is in use by another application or service. You may also be able to use an offline migration to recover files and settings if a computer no longer starts properly.

Important

Some files and settings that you can migrate in an online migration do not apply in an offline scenario. For more information, see What Does USMT Migrate in the USMT User’s Guide.

In the following example, you modify configuration files for an offline migration, disable Windows® BitLocker™ Drive Encryption if necessary, and then boot into the computer by using Windows PE. Next, you run ScanState to gather files and settings from the current installation of Windows, and then you install Windows® 7 and apply the data from the migration store. This scenario applies to computers running Windows XP or Windows Vista®.

  1. Step 1: Modify the USMT Config.xml File to Include User-Group Membership

  2. Step 2: (Optional) Create an Offline.xml File

  3. Step 3: Copy USMT Files and Tools to a USB Flash Drive or a Network Share

  4. Step 4: Suspend BitLocker

  5. Step 5: Boot to Windows PE

  6. Step 6: Run ScanState to Gather Files and Settings

  7. Step 7: Install Windows 7 and Applications

  8. Step 8: Run LoadState to Apply Files and Settings

  9. Next Steps

You can also migrate files and settings from a Windows.old folder from within Windows 7. In an offline migration scenario where you migrate files and settings from the Windows.old folder, you don't need to run the ScanState tool before deploying the operating system, and you can run ScanState and LoadState successively. This scenario is discussed further in the Appendix.

Requirements

To complete this scenario, you need the following:

  • Windows 7 product DVD

Note

Before installing Windows 7, check that your computer meets the minimum hardware requirements for the version of the operating system you want to install. Back up your data files, or save them to a safe location before upgrading. For more information about hardware requirements, see this Microsoft Web site.

  • Windows Automated Installation Kit (Windows AIK) DVD

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

  • Source computer

    A source computer is the computer that you are migrating files and settings from. This computer must have a DVD-ROM drive and a USB port or a network connection. This guide uses a source computer running Windows XP or Windows Vista.

  • Destination computer

    A destination computer is any computer on which you are installing Windows 7 and applying files and settings from the migration store. This computer must have a DVD-ROM drive and a USB port or network connection.

Note

The destination computer for an offline migration scenario can be the same as your source computer.

  • A technician computer

    A technician computer can be any computer that you install the Windows AIK for Windows 7 on. This computer must have a DVD-ROM drive. After you install the Windows AIK, you can copy the USMT folder to other computers in your organization.

  • Windows PE bootable DVD or Windows PE available through Windows Deployment Services on your network

    For information about creating Windows PE media, see Windows PE Walkthroughs.

Important

If you are running ScanState on a source computer that has an x86 version of the operating system installed, you must use an x86 Windows PE image. If you are running ScanState on a source computer with an x64 version of the operating system installed, you must use an x64 Windows PE image.

  • A network connection or a portable media such as a USB flash drive

    A portable media or network connection is required for the technician, source, and destination computers to copy the USMT tools and configuration files between computers. You can also use this media to host the migration store if you plan to reformat the computer. For more information about how much space you need for hosting a migration store, see Estimate Migration Store Size in the USMT.chm.

Install the Windows AIK

  1. Insert the Windows AIK DVD into the DVD-ROM drive on the technician computer.

  2. Follow the instructions in the setup wizard.

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.

Step 1: Modify the USMT Config.xml File to Include User-Group Membership

User-group membership is not preserved during offline migrations. You can add a <ProfileControl> element in the Config.xml file to specify that the migrated users should be made members of a user group. In this example, you create a Config.xml file to add all user accounts to the Users group after they are migrated.

  1. Copy the following code into a text editor such as Notepad.

    <Configuration>
    
    <ProfileControl>
    
        <localGroups>
    
          <mappings>
    
             <changeGroup from="*" to="Users" appliesTo="MigratedUsers">
    
                <include>
    
                   <pattern>*</pattern>
    
                </include>
    
             </changeGroup>
    
          </mappings>
    
        </localGroups>
    
    </ProfileControl>
    
    </Configuration>
    
  2. Save the file as Config.xml.

Note

If you are modifying an existing Config.xml file, add ProfileControl as a child of the parent Configuration element. The /genconfig command creates an example ProfileControl element that you can modify.

Step 2: (Optional) Create an Offline.xml File

If there are multiple drives that have Windows folders on the destination computer, you can create an Offline.xml file that contains information about which path locations to use. You can use this file when you run the ScanState tool with the /offline option. If the computer does not have multiple Windows folders, you can specify the path of the single folder with the /offlineWindir option at the ScanState command prompt in Step 6.

In this example, you create an Offline.xml file that instructs the ScanState tool to check for a valid Windows directory on the C drive. If no valid Windows directory is found on the C drive, the file specifies to look on the D drive and then on the E drive.

  1. Copy the following into a text editor such as Notepad.

    <offline>
    
         <winDir>
    
              <path>C:\Windows</path>
    
              <path>D:\Windows</path>
    
              <path>E:\</path>
    
         </winDir>
    
         <failOnMultipleWinDir>1</failOnMultipleWinDir>
    
    </offline>
    
  2. Save the file as Offline.xml.

For more information about Offline.xml, see the Offline Migration topic in the USMT User’s Guide.

Step 3: Copy USMT Files and Tools to a USB Flash Drive or a Network Share

Copy the USMT tools, modified Config.xml, and Offline.xml files to each computer you are upgrading. In this example, you copy the files to a USB flash drive to transport them to each computer.

  1. Copy all of the contents of C:\Program Files\Windows AIK\Tools\USMT\<architecture> from your technician computer to a network share or a USB flash drive. The <architecture> is either x86 or amd64. For example, at a command prompt, type the following:

    xcopy C:\Program Files\Windows AIK\Tools\USMT\x86 H:\USMTx86
    

    H is the assigned letter of your USB flash drive.

  2. Copy the modified Config.xml and Offline.xml files to the USB flash drive. For example, at a command prompt, type the following:

    xcopy C:\Config.xml H:\USMTx86
    
    xcopy C:\Offline.xml H:\USMTx86
    

Step 4: Suspend BitLocker

If the source computer has BitLocker enabled, you must suspend or disable encryption before you can use the ScanState tool on the drive. For more information about suspending BitLocker encryption, see this Microsoft Web site.

Warning

When you suspend or disable BitLocker, the drive remains encrypted, but the encryption key in not protected until BitLocker is enabled again. If the computer is lost or stolen while in this state, the data on the computer is not protected by BitLocker encryption.

Step 5: Boot to Windows PE

  1. Insert the Windows PE DVD and reboot the computer.

Note

If you are using a network share to copy the USMT tools or for your migration store, you may need to configure Windows PE for network connectivity. For example, you can use the network shell tool (netsh) or the net use command.

Step 6: Run ScanState to Gather Files and Settings

  1. Copy USMT files to the computer from the USB flash drive or the network. For example, insert the USB flash drive and type the following at a command prompt:

    xcopy H:\USMTx86 C:\USMTx86
    

    H is the assigned letter of the USB flash drive.

  2. Set system environment variables for USMT to specify the working directory for the USMT tools and the system architecture. For example, at the Windows PE command prompt, type the following:

    set USMT_WORKING_DIR=C:\USMTx86
    
    set MIG_OFFLINE_PLATFORM_ARCH=32
    

    For AMD64 architecture computers, set MIG_OFFLINE_PLATFORM_ARCH to 64.

  3. Run ScanState with the /offline option and specify where to create the migration store. For example, at a command prompt, type the following:

    scanstate c:\mystore /offline:c:\USMTx86\offline.xml /i:migapp.xml /i:miguser.xml /o /config:config.xml /v:5 /encrypt /key:"mykey"
    

    If you are reformatting the source computer, create the migration store on a network share or portable media.

Step 7: Install Windows 7 and Applications

After you have saved the migration store to a secure location such as a network share or portable media, you can install Windows 7. As a best practice, install applications before loading files and settings from your migration store.

  1. To start Windows 7 Setup, insert the Windows 7 DVD and then reboot the computer. If Windows 7 Setup does not launch automatically, navigate to the DVD drive of the computer and then click setup.exe.

  2. Follow the instructions on the screen to install Windows 7.

Warning

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. Install all user applications on the destination computer. The application version that you install on the destination computer must 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, except for 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?.

Step 8: Run LoadState to Apply Files and Settings

After you install Windows 7, copy the USMT files to the destination computer and then run the LoadState tool to apply files and settings to the new operating system.

  1. Copy the USMT files to the destination computer from the USB flash drive or a network share. For example, at a command prompt, type the following:

    xcopy H:\USMTx86 C:\Program Files\Windows AIK\Tools\USMT\x86
    
  2. Run the LoadState tool and specify the location of the migration store. You do not need to use Offline.xml with LoadState. For example, at a command prompt, type the following:

    loadstate c:\mystore /config:config.xml /i:miguser.xml /i:migapp.xml /v:5 /l:loadstate.log /decrypt /key:"mykey"
    
  3. When LoadState has completed, restart the computer.

Files and settings from the previous operating system are now available on this installation of Windows 7.

Next Steps

For more information about deploying BitLocker for Windows 7, see this Microsoft Web site.

Appendix: Offline Migration from a Windows Folder

You can migrate data from an offline Windows folder from a different installation. You can migrate data from a Windows.old folder if you performed an in-place upgrade, or you can migrate data from any offline Windows folder on another computer or another partition.

The ScanState tool includes two parameters that you can use to gather files from an offline Windows folder:

  • **/offlineWinDir:**WinDir. Specifies the path to the offline Windows folder that USMT uses to gather user-state information. You can use this parameter to point ScanState to an offline Windows folder.

  • **/offlineWinOld:**WinDir. Specifies the path to the offline Windows.old folder. You can use this option to gather files from a previous Windows installation if you upgrade in-place. For example, you can gather data from a previous Windows Vista installation that is contained in the Windows.old directory.

The following steps show how to migrate files from a Windows.old directory. For more information about using /offlineWinDir:, see the command-line help for ScanState.exe.

You can migrate files and settings from a Windows.old directory from within Windows 7. In an offline migration scenario where you migrate files and settings from the Windows.old directory, you don't need to run the ScanState tool before deploying the operating system, and you can run ScanState and LoadState successively.

To migrate offline from a Windows.old directory, follow the same steps as the previous scenario, but in the following order:

  1. Modify Config.xml to Include User-Group Membership

  2. Copy USMT Files and Tools to the UFD or Network Share

  3. (Optional) Suspend BitLocker

  4. Install Windows 7 and Applications

    Install Windows 7, but choose the Custom (Advanced) option instead of the Upgrade option. For a hard-link migration, do not reformat the drive. For more information about hard-link migrations, see Hard-Link Migration store.

  5. Run ScanState to Gather Files and Settings

    Use the /offlineWinOld option instead of the /offline option. For example, at a command prompt, type the following:

    scanstate c:\mystore /offlineWinOld:c:\Windows.old\Windows /i:migapp.xml /i:miguser.xml /o /config:config.xml /v:5 /nocompress
    

Important

If a Windows.old directory is already present on the destination computer before installing Windows 7, the new folder is named Windows.old.nnn, where nnn is a three-digit number such as 000 or 001.

You can also use a hard-link migration for this scenario. For example, at a command prompt, type the following:  
  

    scanstate c:\mystore /offlineWinOld:c:\Windows.old\Windows /hardlink /i:migapp.xml /i:miguser.xml /o /config:config.xml /v:5 /nocompress

Warning

When using a hard-link migration, do not format the drive. For more information about hard-link migrations, see Hard-Link Migrations.

You can use the /offlinewindir option to point to an offline Windows folder. Use this option to migrate from a Windows directory on a different computer or a different partition. For example, type the following:  
  

    scanstate c:\mystore /offlineWinDir:c:\Windows /hardlink /i:migapp.xml /i:miguser.xml /o /config:config.xml /v:5 /nocompress
  1. Run LoadState to Apply Files and Settings

    Include the /hardlink option in the LoadState syntax as well. For example, at a command prompt, type the following:

    loadstate c:\mystore /config:config.xml [/hardlink] /i:miguser.xml /i:migapp.xml /v:5 /l:loadstate.log  /nocompress /lac
    

See Also

Concepts

Migrating Files During a Remote Installation with USMT and Windows Deployment Services

Other Resources

USMT User's Guide