Migrate to Windows 7 using USMT

Before you start

Objectives: learn where to find USMT and which commands you can use to gather user profiles from source installation and then apply them to the destination installation. This is demo on how to use USMT to migrate user profiles from old to new Windows installation (XP to 7 in this case). Although here you can see all steps required to do migration completely, for more advanced usage of all USMT options you will have to read USMT documentation.

Prerequisites: you have to be familiar with migration concepts in general and with tools which you can use.

Key terms: usmt, user profile, scanstate, loadstate, command, account, cmd, syntax, source, destination

Running USMT on Source Computer

USMT is a part of Windows AIK, but it can also be downloaded from Microsoft website as a standalone application. The thing is, since we will migrate users from XP, we have to have USMT on XP machine. There are two ways to put USMT on XP. First would be to download UMST from Microsoft site and install it. During te installation you can choose the installation folder, which you have to remember. The second way implies that you have Windows AIK installed on your Windows 7 machine. USMT will be located in C:\Program Files\Windows AIK\Tools\USMT\x86 folder (if you have x64 system you have to use x64 version) which contains all the files needed for user migration. We can copy this folder to a network share to make it always available. For this demonstration we will simply copy USMT folder to the C: drive of our Windows XP machine. Tools that we are going to use (scanstate and loadstate) are command line tools, so the first thing we need to do is run Command Prompt (CMD) on our XP machine. In CMD we have to go to our newly created USMT folder, so we will enter the command: cd c:\usmt\x86

USMT Folder in CMD

Image 170.1 – USMT Folder in CMD

Now, we want to copy all users from Windows XP to Windows 7. To do that, first we need to run scanstate tool on the Windows XP. To check which parameters must be provided to the scanstate tool simply enter scanstate in CMD.

Scanstate Syntax

Image 170.2 – Scanstate Syntax

We can see that the syntax is: scanstate <StorePath> [Options]. In this demo we will save all data locally in c:\usmt\users folder, so lets create a migration store by entering the following command:scanstate c:\usmt\users. This command will gather information about all user accounts on this machine and save it in the c:\usmt\users folder. It is possible to modify this command to select which account to include or exclude. In our case it gathered information about 8 users.

Scanstate Finished

Image 170.3 – Scanstate Success

Destination Computer

Once the scanstate is complete we can switch to the destination computer which is Windows 7 in our case. Now, we need to remember where we saved users from the source machine. The best thing would be to use a network share so we can access those resources from any computer on the network. For the purpose of this demonstration we have copied gathered user profiles which were exported to the c:\usmt\users folder on the Windows XP machine, to the c:\usmt\users folder on the Windows 7 machine. Also, we have copied x86 folder which contains USMT, to the c:\usmt folder on Windows 7 machine. The first thing we need to do on destination computer is to run elevated CMD. To do that, right-click CMD and select ‘Run as administrator’. Next, we need to get to the c:\usmt\x86 folder, so we will enter the command: cd c:\usmt\x86. Next, to load users that we exported from Windows XP, we will use that loadstate tool. Let’s enter loadstate in CMD.

Loadstate Syntax

Image 170.4 – Loadstate Syntax

We can see that the syntax for the loadstate command is loadstate <StorePath> [options]. To load user accounts we will enter the command: loadstate c:\usmt\users /lac. The /lac option means that we want to create local accounts that do not exist on our destination computer. If accounts already existed we would not have to use the /lac switch because the information would be migrated to existing accounts. Now, because we did not provide passwords for accounts that were migrated, they will be created as disabled. Once all accounts are created, the migration data is copied.

Loadstate Success

Image 170.5 – Loadstate Success

Some often used options for the scanstate and loadstate commands are:

  • /i – includes the specified XML-formatted configuration file to control the migration
  • /ui – migrates specified users data
  • /ue – excludes the specified users data from migration
  • /lac – creates a user account if the user account is local and does not exist on the destination computer
  • /lae – enables the user account created with the ‘/lac’ option
  • /p /nocompress – generates a space-estimate file called Usmtsize.txt

Once the migration is complete we can go to the Computer Management to verify new accounts.

New Accounts

Image 170.6 – New Accounts

As we can see, new accounts were created but they are disabled. Disabled accounts have an icon with an arrow pointing down. To enable an account right-click it, go to Properties, in General tab uncheck the ‘Account is disabled’ option and then click Apply.


USMT is a part of Windows AIK, but it can also be downloaded from Microsoft website as a standalone application. Command Line tools that are part of USMT are Scanstate and Loadstate. Scanstate gathers information about users. Syntax for Scanstate is: scanstate <StorePaht> [Options]. Loadstate applies gathered information to new installation. Syntax for loadstate is loadstate <StorePaht> [options].

Commands that are mentioned in this article

All commands are entered in Command Line:

  • cd c:\usmt\x86 – change directory to c:\usmt\x86
  • scanstate c:\usmt\users – gather information about user accounts and save it in the c:\usmt\users folder
  • loadstate c:\usmt\users /lac – load user accounts from c:\usmt\users folder. /lac is used to create local accounts that do not exist on our destination computer.

Paths that are mentioned in this article

  • C:\Program Files\Windows AIK\Tools\USMT\x86 – USMT location when we have installed Windows Automated Installation Kit (WAIK)
  • c:\usmt\x86 – folder where we have copied USMT tools on both source and destination installation.