Real Time Web Analytics Migrate Windows XP to Windows 7 Using USMT (User State Migration Tool) [Upgrade XP or Vista] Step By Step - ITProGuru Blog by Systems Management Expert Dan Stolts - Site Home - TechNet Blogs

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

       Build Your Lab! Download Windows Server 2012
       Don’t Have a Lab? Build Your Lab in the Cloud with Windows Azure Virtual Machines
       Want to Get Certified? Join our Windows Server 2012 "Early Experts" Study Group
Share with friends!

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

  • Comments 24
  • Likes

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 file
Default configuration files come with the USMT

You 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 applications

Standard 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 permissions
We are mapping a drive so we do not have to keep typing the full path
Where <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 file
Default configuration files come with the USMT
For 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 – Restart


DONE

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

Attachment: Windows_XP_Upgrade_to_Windows_7_Using_USMT_User_State_Migration_Tool.pptx
Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Did you mean to do migapp and migdocs?  I was expecting only user state information, but it looks like I got everything (165GB MIG file).  Whereas when I run with miguser and migapp using the XP USMT, I get a MIG that is consistently the size of the user state data.

    ----

    You are correct.  If you want to get the docs use migdocs.xml. Users use miguser.xml Thanks for the note. I fixed the post. 

  • I did what it said and I get an error message saying ' scanstate '  is not recognized as an internal or external command , operable program or batch file. It worked before . Now I wanted to update my docs and the command wont work. My storage is my network drive.

    Im coming from Vista x86 to Windows 7 x64.

     -----

    Hi Mike, you have to install the USMT utilities which are part of the Automated Installation Kit (AIK).  It it is installed, just change to the directory where you have it installed. 

  • Nice and simple to understand the basic working of USMT.

    I have a scenario where i need to migrate winxp to win7. Knowning that USMT 4.0 supports running from winpe, here's what i would like to achieve:

    Boot the pc (running XP) with winpe, run scanstate (store state on network server).

    Next apply the win7 image, then call loadstate. And finally once we reboot.

    Basically i would like to see the usage of USMT (scan/load) from WINPE.

    Thanks again for the wonderful work.

    ----

    Hi Jamie, 

    I have not tried running Scanstate from WinPE.  I would think that this would give you a less than desirable outcome.  I think it would not see the users as the WinPE does not have users.   I could see grabbing the folders, but then not sure if would be able to put them back down in the right place on the loadstate.  I will look into it when I get a chance.

     

  • I plan to migrate from WIndows XP to WIndows 7  via the "PC refresh using Windows.old and the hard-link migration store" as discussed in the USMT 4.0 user's guide. Is it possible to do with via an automated deployment of Win 7 using the MDT 2010 toolkit?

  • Congrats on a great blog Dan - this was great as usual. However - having a problem with load state.  Keeps giving me an error 27 that the store path or permissions is wrong. I finally put the usmt.mig on the local drive on the new win7 install - c:\store - took ownership, opened up permissions wide open. Same error.

    command line:

    loadstate c:\store /c /lac /lae /i:miguser.xml /i:migdocs.xml

    Suggestions:

    1. when running usmt commands in win7 (and vista) you have to open an Admin cmd console or you get event 71.

    2. your instructions on Scanstate would have been better if you'd made a quick note about migapps.xml as another option.

    thanks!

  • hi,

    I'm a Microsoft partner specializing in deployments where relatively small organizations (less than 50 clients, usually in non-active directory environments-- although many of my clients have some version of Windows server installed on their network). I am watching the video associated with this post, and I just want to say that I agree with you 1000% in the utility of MDT 2010 in small environments. As you say anything from five clients and up is appropriate. I just wish that Microsoft provided more appropriate documentation for scenarios in the 5 to 25 client range. When I worked for Microsoft a few years back, they were always moaning about the need to do a better job in the small to medium-sized enterprise space. In my opinion products such as SBS are too complicated/restrictive -- particularly in the smaller end of the space. At any rate I'm not going to rant here, I'm just glad you acknowledge the utility of MDT 2010 at the small end of the spectrum.

  • hi,

    I'm a Microsoft partner specializing in deployments where relatively small organizations (less than 50 clients, usually in non-active directory environments-- although many of my clients have some version of Windows server installed on their network). I am watching the video associated with this post, and I just want to say that I agree with you 1000% in the utility of MDT 2010 in small environments. As you say anything from five clients and up is appropriate. I just wish that Microsoft provided more appropriate documentation for scenarios in the 5 to 25 client range. When I worked for Microsoft a few years back, they were always moaning about the need to do a better job in the small to medium-sized enterprise space. In my opinion products such as SBS are too complicated/restrictive -- particularly in the smaller end of the space. At any rate I'm not going to rant here, I'm just glad you acknowledge the utility of MDT 2010 at the small end of the spectrum. Found the video valuable.

  • hey i have a situation where in my network users use roaming profiles and i want to migrate these roaming profiles to windows 7 systems. would i be able to use the migrated roaming profiles in windows 7? also will these migrated profiles be able to sync normal with the server.

    Note that windows 7 use a ".V2" files extension for roaming profiles and windows XP doesn't.

    ----

    Sorry, not sure how roaming profiles are handled. Will have to dig into that when I get a chance.  If anyone else, has the answer, please post a comment.

  • It's awesome, but one thing i would like to ask u is that do i need to create a new partition for the installation or i just do clean install?

    can u plx reply for me. I want to do this with my vista machine.(only one machine)

    ----

    No, you do not need to create a new partition.  However, if it is important data, you should do a backup (just in case)  The only time I have seen USMT fail is when options were not done correctly or things were not turned on that need to be turned on.  However, this information was not helpful to the people that lost data.

  • Mr.Dan, I solve problem. which is the administrator account was disable by default. i did not know it. so i just enable it and now run the scanstate command and it's working. This is actually way faster than using the win easy transfer. One again thanks for your help. if i have the further problem i will bother u agian :D.

    Have a great day, Pro. ;)

  • Dear Mr.Dan,

    Nothing much, i just wondering that is there another way which is similar to this method and that is faster than this one? ;) Can u sneak for me ;;)

    --- Yes

    If you run the USMT with the HardLink migration it is much faster (assuming you have a fair amount of data) however, please make a backup before, just to be safe.

  • Sorry Mr. Dan,

    Now i can run the windows 7 cd, but i got error says:

    Windows Setup could not reinitialize the deployment engine. To install Windows, restart the installation.

    i did, but still get the same error?

    Do u know why?

  • I got problem when running loadstate command. it said invalid store path.

    It's weird. before my store location was G: drive now it's change to E:\ drive, i specify store path using E:\USMT\Save but still can't make it's work.

    While install the windows 7 i did delete few partitions. My computer now look like i just did fresh install.....Can i still retrieve or reload my file and setting or.....:(( hu hu. Can u show me the ways? please.....

  • Dear Mr.Dan,

    Finally, everything is working, i could not use the loadstate command to complete so i user easy transfer to do. Now ti's working perfect. Anyhow, thanks for your help.

    -------------Backup-Backup&Backup------------

  • I was wondering if we can do the same to activated accounts already on a system whos os has failed, and needed to be reinstalled

     

    --- if you are referring to he activation key, YES you can use a key that has been used before.  You may have to call in for activation