Share via


Step-by-Step: Offline Migration with USMT

Applies To: Windows 7, Windows 8, Windows 8.1

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

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 this 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® 8 and apply the data from the migration store. This scenario applies to computers running Windows XP, Windows Vista®, or Windows® 7.

You can also migrate files and settings from a Windows.old folder from within Windows 8. In an offline migration scenario where you migrate files and settings from the Windows.old folder, you do not have 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: Offline Migration from a Windows Folder.

In this topic

  • Requirements

  • Install the Windows ADK

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

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

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

  • Step 4: Suspend BitLocker

  • Step 5: Boot to Windows PE

  • Step 6: Run ScanState to Gather Files and Settings

  • Step 7: Install Windows and Applications

  • Step 8: Run LoadState to Apply Files and Settings

  • Next Steps

  • Appendix: Offline Migration from a Windows Folder

Requirements

To complete this scenario, you need the following:

  • Windows 8 product DVD

    Note

    Before installing Windows, 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 Assessment and Deployment Kit (Windows ADK)

    You can run ADK Setup directly from the Internet. You can also use a computer that has Internet access to download the installer files so that you can run Setup on an offline computer. In the Windows ADK Setup Wizard, you can select the features that you want to install, such as USMT.

  • 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, Windows Vista, Windows 7, or Windows 8.

  • Destination computer

    A destination computer is any computer on which you are installing a new version of Windows 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 on which you install the Windows ADK. This computer must have a DVD-ROM drive. In the Windows ADK Setup Wizard, you can select the features that you want to install, such as USMT. After you install USMT you can copy the USMT folder to other computers in your organization.

    Note

    A portable media or network connection is required for the technician, source, and destination computers to copy USMT and the 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.

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

    For information about creating Windows PE media, see WinPE: Create USB Bootable drive.

    Note

    • You'll need a version of Windows PE that supports your migration. For example, to migrate to Windows 8.1, you'll need Windows PE 5.0. For more info, see What's New in Windows PE.

    • 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.

Install the Windows ADK

You can run ADK Setup directly from the Internet by using either the graphical user interface (GUI) or the command line.

  1. On your technician computer, run ADK Setup.

  2. Select Install, specify the location where you want to install ADK features, and then click Next.

  3. In the Assessment and Deployment Kit window, select the ADK features that you want to install, including USMT and then click Install.

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: Run ScanState to Gather Files and Settings.

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 Offline Migration Reference.

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

Copy the USMT, 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 the USMT folder 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 (x86)\Windows Kits\8.0\Assessment and Deployment Kit\User State Migration Tool\x86" F:\USMTx86
    

    F 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 F:\USMTx86
    
    xcopy C:\Offline.xml F:\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

Insert the Windows PE DVD and reboot the computer.

Note

If you are using a network share to copy the USMT 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 F:\USMTx86 C:\USMTx86
    

    F is the assigned letter of the USB flash drive.

  2. Set system environment variables for USMT to specify the working directory for USMT 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:migdocs.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 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 8. As a best practice, install applications before loading files and settings from your migration store.

  1. To start Windows Setup, insert the Windows DVD and then reboot the computer. If Windows 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.

    Warning

    You can use an unattended answer file to customize your Windows deployment. For more information, see Windows System Image Manager Technical Reference.

  3. 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, see What Does USMT Migrate?.

Step 8: Run LoadState to Apply Files and Settings

After you install Windows, 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 F:\USMTx86 C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\User State Migration Tool\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:migdocs.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.

Next Steps

For more information about deploying BitLocker for Windows, 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 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. In an offline migration scenario where you migrate files and settings from the Windows.old directory, you do not have 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. Step 1: Modify the USMT Config.xml File to Include User-Group Membership

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

  3. Step 4: Suspend BitLocker

  4. Step 7: Install Windows and Applications

    Install Windows, 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. Step 6: 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:migdocs.xml /o /config:config.xml /v:5 /nocompress
    

    Important

    If a Windows.old directory is already present on the destination computer before installing Windows, 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:migdocs.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 Migration Store.

    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:migdocs.xml /o /config:config.xml /v:5 /nocompress
    
  6. Step 8: 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:migdocs.xml /i:migapp.xml /v:5 /l:loadstate.log  /nocompress /lac
    

See Also

Reference

Offline Migration Reference

Concepts

Step-by-Step: Migrating Files During a Remote Installation with USMT and Windows Deployment Services