Migrate Windows XP to Windows 7 Using USMT (User State Migration Tool) [Upgrade XP or Vista] Step By Step

In this 22 Minute video we walk through the process of upgrading a machine from Windows XP to Windows 7.  There is no direct upgrade path from XP to Windows 7 so we are using the User State Migration Tool to migrate user data and settings.  Note that this USMT example does not migrate OS or Applications.  You will have to install the operating system and the applications on the destination computer.  Some applications do not have to be installed on the destination computer.  For details on what applications are covered in the MigApp.xml file check out the USMT Application blog post: Upgrading Windows XP to Windows 7 and Migrate Microsoft Office and Other Applications Using The User State Migration Tool (USMT)

 

 

You can find the downloadable files at the following URLs on Edge:

Right-Click, Save As below links…

Lite-Touch, High-Volume Deployment. This strategy requires limited interaction during deployment. Interaction occurs at the beginning of installation, but the remainder of the process can be automated. Microsoft recommends this strategy to organizations with a dedicated IT staff that have managed networks with 200–500 client computers. Prior deployment experience is not required but is beneficial for using this strategy.  Personally, I would use this method for almost all size organizations.  Maybe not to upgrade Gramma’s computer but certainly would for even small companies.

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 Scan State tool
Step 2: Install Windows 7
Step 3: Apply data using the LoadState tool

Step By Step Detail…

Step 1: Gather data using the Scan State tool – From your XP or Windows Vista (SOURCE) computer…

What’s Going On Step By Step
The USMT Tools are part of the Windows 7 AIK (Automated Installation Kit)Download and extract USMT tools to C:\USMT (<USMTpath>) on the XP Machine.  The AIK is an ISO image so you will have to burn it to disk or mount using your favorite ISO mounting tool. I’ll Let you go this one alone!
From the Windows XP Machine (SOURCE) we need to run scanstate to package our files and settings.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./o = Overwrite/c = Continue on non-fatal errors/i:miguser.xml => Read in this configuration file/i:migdocs.xml => Read in this configuration fileDefault configuration files come with the USMTYou might want to consider using the /l switch to place the log file with the <USMTStorPath> Start Run – cmd <ENTER>

 

cd \ <USMTpath> <ENTER>

scanstate <USMTStorePath> /o /c /i:miguser.xml /i:migdocs.xml

 

Step 2: Install Windows 7

What’s Going On Step By Step

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 Automated Installation Kit for Windows 7 RC

Format your existing machine or install Windows 7 on a new machine.  Download and extract USMT files (See step 1). Login as an administrative user on the Windows 7 machine.What I have found many people like to do is instead of wiping the drive, they put a new (usually bigger) hard drive in.  Take the old one out and do the windows 7 install on the new drive.  You get a bigger faster drive, likely more reliable since it is new and the side effect is you have a complete machine backup.When you did a ScanState in step 1 above it did not MOVE or delete any files.  It made a copy of them.After Installing OS, You will need to install your applicationsStandard Disclaimer: Once you format the disk, the data is gone so please make sure you have a backup (just in case).  I have never seen this tool fail but I am very particular when it comes to customer data so I would recommend some kind of Plan B just in case.
I’ll Mostly Let you go this one alone!

It is a pretty easy process even if you want to do it manually…

1. Insert Windows 7 DVD

2. Restart WindowsXP-to-7

3. BOOT TO DVD - WAIT

4. SHOW ENGLISH, click NEXT

5. Click Install Now.

6. Check Accept License Agreement

7. Click Custom (advanced) .

8. Select DISK 0 Partition 1

9. Select Drive Options button

10. FORMAT, OK

Wait

 

Step 3: Apply data using the LoadState tool

What’s Going On Step By Step
From the Windows 7 Machine (DESTINATION) we need to run loadstate to restore our packaged files and settings.<CTRL-SHIFT-ENTER> runs with elevated permissionsWe are mapping a drive so we do not have to keep typing the full pathWhere <USMTpath> computer and share where you have saved the USMT files and tools. Start cmd <CTRL-SHIFT-ENTER>

 

Net Use G: <USMTpath>

g:

Now we simply run Loadstate…<StorePath> is the full path to a folder on a network server where you created the migration store./c = Continue on non-fatal errors/lac = Create accounts that do not exist (they will be disabled) /lae = enable accounts create with /lac /i:miguser.xml => Read in this configuration file/i:migdocs.xml => Read in this configuration fileDefault configuration files come with the USMTFor more information, see LoadState Syntax.
  
 loadstate  <StorePath>    /c /lac /lae /i:miguser.xml /i:migdocs.xml
 WAIT
  
Once complete, we just need to reboot.Passwords are not copied from the old computer.  Unless you supplied a password with the /lac switch, once you login, you will be forced to put in a password. Start – Shutdown – RestartDONE

If you want additional information on what applications can be migrated check out this blog post…

Upgrading Windows XP to Windows 7 and Migrate Microsoft Office and Other Applications Using The User State Migration Tool (USMT)

Other Resources:

User State Migration Tool 4.0
Windows Automated Installation Kit for Windows 7 RC
Step-by-Step: Windows 7 Upgrade and Migration

 

What's New in USMT 4.0

Applies To: Windows 7, Windows Vista

This topic describes new features as well as changes in command-line options in Microsoft® Windows® User State Migration Tool (USMT) 4.0.

Overall Changes from USMT 3.0

  • Hard-link migration store
    The new hard-link migration store is for use in computer-refresh scenarios only. Hard-link migration stores are stored locally on the computer that is being refreshed and can migrate user accounts, files and settings in less time using megabytes of disk space instead of gigabytes.
  • Improved Space estimation
    The ScanState command now more accurately estimates the size of the migration store as well as the additional temporary disk space required to create the migration store. This results in a reduction of migration failures due to low disk space. The ScanState command now also estimates the size of the compressed migration store.
  • Ability to gather data from an offline Windows® operating system using the ScanState command
    You can gather data from an offline Windows® operating system using the ScanState command in Microsoft® Windows PE. In addition, USMT now supports migrations from previous installations of Windows® contained in Windows.old directories. The offline directory can be a Windows directory when you run the ScanState command in Windows PE or to Windows.old when you run the ScanState command in Windows.
  • Domain controller access is no longer required by ScanState and LoadState. It is now possible to complete an end-to-end migration of domain user accounts without having domain controller access.  The destination computer must be domain-joined before any newly applied domain accounts can be used.
  • Integration with Microsoft System Center Configuration Manager (SCCM) and the Microsoft Deployment Toolkit (MDT)
    You can reduce end-user and deployment time. You can use USMT 4.0 to retain end-users’ digital identities as well as application and operating system settings, in conjunction with SCCM and/or MDT.
  • Configurable file errors
    You can use the new <ErrorControl> section in the Config.xml file to configure which file or registry read/write errors can be safely ignored by the /c command-line option and which might cause the migration to fail. In addition, the /genconfig command-line option now generates a sample <ErrorControl> section that is enabled by specifying error messages and desired behaviors in the Config.xml file.
  • New helper functions
    The ScanState command has two new helper functions that enable new migration scenarios. The MigXmlHelper.FileProperties function can be used to control which files migrate, based on properties you specify; for example, date created, date modified, date accessed, and file size. The MigXmlHelper.GenerateDocPatterns function can be used to automatically find user documents on a computer without authoring extensive custom migration .xml files.
  • Volume shadow copy support
    With the /vsc command line option, the ScanState command can now use the volume shadow copy service to capture files that are locked for editing by other applications.
  • Local group migration
    You can use the new <ProfileControl> section in the Config.xml file to configure the local group membership of users during the migration. This enables scenarios such as changing users from being members of the local administrators group to being members of the local users group during the migration.
  • List files being migrated
    You can use the /listfiles command-line option for the ScanState command to generate a text file list of all files included in the migration.
  • Usmtutils.exe
    This new executable file supplements the functionality in Scanstate.exe and Loadstate.exe.
  • New AES encryption options
    USMT 4.0 enables support for stronger encryption algorithms, called Advanced Encryption Standard (AES), in several key size options, based on support in the source computers' operating system.

Changes to the ScanState Command

USMT 4.0 contains new ScanState command-line options. In addition, some command-line options have changed.

New Command-line Options

The following table lists new command-line options for the ScanState command.

Option
Explanation

/listfiles: "path to a file"

Generates a text file listing all the files included in the migration.

/p: "path to a file"

When an optional file location is specified, the /p option indicates that the new space-estimate algorithms are used. If you do not specify the optional file location, the /p option's functionality is the same as in USMT 3.0. These include an estimation of the disk space that is needed to create and build the migration store, as well as the space needed to host the migration-store contents. These estimates are provided in an .xml file at the location specified on the command line.

If the /nocompress option is also specified, the estimate will be for an uncompressed migration store. If the /nocompress option is not specified, the estimate will be for a compressed migration store.

/hardlink

Enables the creation of a hard-link migration store at the specified location. The /nocompress option must be specified with the /hardlink option. Additionally, the <HardLinkStoreControl> element can be used in the Config.xml file to change how the ScanState command creates hard-links to files that are locked by another application.

/vsc

This option enables the volume shadow copy service to migrate files that are locked or in use by another application.

This option can be used only with the ScanState executable file and cannot be combined with the /hardlink option.

/auto: "path to script files"

This option enables you to specify the location of the default .xml files and then launch your migration. If no path is specified, USMT will reference the directory where the USMT binaries are located. The /auto option includes the following options /i:MigDocs.xml /i:MigApp.xml /v:13.

/offline: "path to an offline.xml file"

This option is used to define a path to an offline .xml file that specifies offline migration options; for example, an offline Windows directory to capture user state from, as well as remapping on drive letters and mount points.

/genmigxml: "path to a file"

This option specifies that the ScanState command should use the document finder to create and export an .xml file that defines how to migrate all of the files found on the computer on which the ScanState command is running. The document finder, or MigXmlHelper.GenerateDocPatterns helper function, can be used to automatically find user documents on a computer without authoring extensive custom migration .xml files.

/offlinewindir: "path to a windows directory"

This option specifies the offline Windows directory that the ScanState command gathers user state from. The offline directory can be Windows.old when you run the ScanState command in Windows or a Windows directory when you run the ScanState command in Windows PE. This option is incompatible with the /offline option.

/offlinewinold <Windows.old directory>

This command-line option enables the offline migration mode and starts the migration from the location specified. It is only intended to be used in Windows.old migration scenarios, where the migration is occurring from a Windows.old directory.

/efs:hardlink

Creates a hard-link to the EFS file instead of copying it. Use only with the /hardlink and /nocompress options.

Changed Command-line Options

The following ScanState command-line options have changed in USMT 4.0.

Option in USMT 3.0
Explanation for change in USMT 4.0

/p

The /p option estimates the space needed to contain the compressed or uncompressed migration store. When an optional file location is specified, the /p: "path to a file" command-line option uses the new space-estimation algorithms.

/encrypt: "encryption strength"

You can specify a parameter to define the desired encryption strength for the migration store.

/genconfig

The /genconfig option now generates sample <ErrorControl> and <ProfileControl> sections in the Config.xml file that enable the new error control and local group migration behavior.

/o

The /o option is now is required to overwrite both the migration store and the Config.xml file.

Changes to the LoadState Command

USMT 4.0 contains new LoadState command-line options. In addition, some command-line options have changed.

New Command-line Options

The following table lists new LoadState command-line options.

Option
Explanation

/hardlink

Enables user state data to be restored from a hard-link migration store. The /nocompress option must be specified with the /hardlink option.

/auto: "path to script files"

This option enables you to specify the location of the default .xml files and then launch your migration. If no path is specified, USMT will reference the directory where the USMT binaries are located. The /auto option include the following options /i:MigDocs.xml /i:MigApp.xml /v:13.

Changed Command-line Options

The following LoadState command-line options have changed in USMT 4.0.

Option in USMT 3.0
Explanation for change in USMT 4.0

/decrypt: "encryption strength"

The /decrypt option now accepts a command-line parameter to define the encryption strength specified for the migration store encryption.

/targetxp

The /targetxp command-line option is no longer valid in USMT 4.0 because Windows XP is not supported on a destination computer.

MigSys.xml

The MigSys.xml file is no longer valid. This file was used only in Windows XP migrations where Windows XP was the operating system on the destination computer.

/q

The /q option is no longer supported, because both the ScanState and LoadState commands require administrator privileges to run.

Usmtutils.exe

The following table lists all new Usmtutils.exe command-line options in USMT 4.0.

New option in USMT 4.0
Description

/ec

This option returns a list of supported cryptographic algorithms (AlgIDs) on the current system.

/rd <storeDir>

Removes the directory path specified by the <storeDir> argument on all of the fixed drives. This command is useful for deleting hard-link stores that cannot otherwise be deleted due to a sharing lock. For example: usmtutils /rd D:\MyHardLinkStore

Windows_XP_Upgrade_to_Windows_7_Using_USMT_User_State_Migration_Tool.pptx