Export (0) Print
Expand All

User State Migration in Windows XP

Published: June 01, 2001 | Updated: August 08, 2001

Abstract

This paper provides an overview of tools for migrating files and settings in the Windows® XP operating system. Part 1 includes a summary of the Files and Settings Transfer Wizard, which is aimed at individual users in a home, small office or lightly managed corporate environment. Part II provides a technical overview of the User State Migration Tool, a command-line tool designed for performing mass deployments of the Windows XP Professional in a corporate environment.

On This Page

Introduction
Part I: Files and Settings Transfer Wizard Overview
Part II: User State Migration Tool (USMT) Overview
What's in USMT
Modifying the Migration Rule INF File
Summary
Related Links

Introduction

Migrating files and settings is made easier in Windows XP with two tools aimed at different types of users and situations:

  • Files and Settings Transfer Wizard. Designed for home users and small office users. The wizard is also useful in a corporate network environment for employees who get a new computer and need to migrate their own files and settings without the support of an IT department or Helpdesk.

  • UserState Migration Tool (USMT). Designed for IT administrators in performing large deployments of Windows XP Professional in a corporate environment. USMT provides the same functionality as the wizard, but on a large scale targeted at migrating multiple users. USMT gives administrators command line precision in customizing specific settings such as unique modifications to the registry.

This paper is presented in two parts. Part 1 provides a short overview of the Files and Settings Transfer Wizard and helps users get started. Part II provides a deeper technical overview of USMT and shows administrators how to approach the modification of INF files.

Part I: Files and Settings Transfer Wizard Overview

This section provides a summary of the Files and Settings Transfer Wizard. This tool is aimed at individual users in a home or small office environment, allowing them to migrate all of their files and settings.

Benefits of the Files and Settings Transfer Wizard

The wizard provides a quick and straightforward way for users to copy their files and settings and resume optimal productivity on their new computer or new installation of Windows. The wizard makes it easier to move to Windows XP through reduced:

  • Downtime re-personalizing the desktop.

  • Downtime finding missing work files.

  • Need to call technical support with re-personalizing the desktop.

  • Ramp-up time using the new operating system.

Migrated Settings

The settings fall into four major groups:

  • Appearance. This includes items such as wallpaper, colors, sounds, and the location of the taskbar.

  • Action. This includes items such as the key repeat rate, whether double-clicking a folder opens it in a new window or the same window, and whether you need to double-click or single-click an item to open it.

  • Internet. These are the settings that let you connect to the Internet and control how your browser operates. This includes items such as your home page URL, favorites or bookmarks, cookies, security settings, dial-up connections, and proxy settings.

  • Mail. This includes the information you need to connect to your mail server, your signature file, views, mail rules, local mail, and contacts. The mail clients supported are Outlook® and Outlook Express.

Application settings

The wizard currently supports migrating specific application settings including Microsoft Office (Access, Excel, Outlook®, PowerPoint®, and Word). Support for migrating additional applications will be included when Windows XP is released.

Note that only applications settings are migrated; actual applications are not migrated. Users still need to re-install applications on your new computer.

Summary of migrated settings

Migrated setting groups include:

  • Internet Explorer settings

  • Outlook Express settings and store

  • Outlook settings and store

  • Dial-Up connections

  • Phone and modem options

  • Accessibility

  • Screen saver selection

  • Fonts

  • Folder options

  • Taskbar settings

  • Mouse and keyboard settings

  • Sounds settings

  • Regional options

  • Office settings

  • Network drives and printers

  • Desktop folder

  • My Documents folder

  • My Pictures folder

  • Favorites folder

  • Cookies folder

  • Common Office file types

Migrated Files

Files are migrated by file type (.DOC), folder (C:\My Documents), or specific name (C:\Important\money.mny). The wizard copies many of the common file types and folders by default and gives you the option of adding or removing folders, file types, or specific files.

To start the wizard

  • Click Start, All Programs, Accessories, System Tools, Files and Settings Transfer Wizard.

For detailed guidance in using the wizard in different scenarios, see Step-by-Step Guide to Migrating Files and Settings at http://www.microsoft.com/technet/prodtechnol/winxppro/deploy/mgrtfset.mspx.

Part II: User State Migration Tool (USMT) Overview

The User State Migration Tool provides all the same functionality as the Files and Settings Transfer Wizard plus the ability for administrators to fully customize specific settings such as unique modifications to the registry.

USMT is designed for administrators only; individual users do not need to use USMT. In addition, USMT requires a client computer that is connected to a Windows Server domain controller.

Benefits of USMT

USMT reduces the cost of deploying the operating system by addressing each of the following areas:

  • Migration technicians costs.

  • Employee downtime re-personalizing the desktop.

  • Employee downtime finding missing work files.

  • Help desk calls assisting employees with re-personalizing their desktop.

  • Employee ramp up time on the new operating system.

  • Employee satisfaction with the migration experience.

USMT is driven by a shared set of INFs files that can be modified by IT professionals or OEMs. In virtually all cases, when using USMT for automated migration, IT pros will want to modify the INFs to better handle their unique environment and needs. This section addresses the technical details to help IT pros use USMT and modify INF files.

What's in USMT

The User State Migration Tool consists of two executable files, ScanState.exe, LoadState.exe, and four migration rule information files Migapp.inf, Migsys.inf, Miguser.inf, and Sysfiles.inf.

ScanState.exe collects user data and settings based on the information contained in Migapp.inf, Migsys.inf, Miguser.inf and Sysfiles.inf. LoadState.exe deposits this user state data on a computer running a fresh (not upgraded) installation of Windows XP Professional.

Additional INF files can be created for additional migration requirements. With no modification to default settings, USMT migrates:

  • Internet Explorer settings

  • Outlook Express settings and store

  • Outlook settings and store

  • Dial-Up connections

  • Phone and modem options

  • Accessibility

  • Classic desktop

  • Screen saver selection

  • Fonts

  • Folder options

  • Taskbar settings

  • Mouse and keyboard settings

  • Sounds settings

  • Regional options

  • Office settings

  • Network drives and printers

  • Desktop folder

  • My Documents folder

  • My Pictures folder

  • Favorites folder

  • Cookies folder

  • Common Office file types

It is easy to modify what is included in the state that ScanState.exe collects. The tool can be instructed to collect or leave specified files, folders, registry entries, or registry subtrees. For rules on modifying the scripts, see Modifying the Migration Rule INF File below.

Table 1 UserState Migration Tool Requirements

Type of system

Requirements

Source system

Windows 95, Windows 98, Windows NT Workstation 4.0, or Windows 2000 Professional.
Access to the intermediate store

Intermediate store

Storage based on data to be migrated. (50 MB is often enough for typical users, but this can vary.)

Target system

Windows XP Professional
Access to the intermediate store
Appropriate amount of drive space to receive the user state data

Using USMT

In the simplest case, the default migration rule INF file (Sysfiles.inf) is used as is for the migration. The administrator must create a script to run on the client workstation. The script should:

  • Run ScanState.exe on the client workstation, copying the user state data to an intermediate store. You can send a shortcut to the script to the users and instruct them to run this program when they leave for the evening, or you can deploy the script automatically or on a schedule.

  • Reformat the disk and install Windows XP Professional and applications as needed. This can be automated by using disk-imaging software.

  • Run LoadState.exe as the local administrator on the client workstation to restore the user settings. (This can be done as a scheduled task running in the local administrator context.)

When the user logs on, the last of their user state data is reset.

If you want to modify the default parameters in Sysfiles.inf, follow these steps::

  1. Identify which application settings to migrate.

  2. Identify which file types, folders, or specific files to migrate.

  3. Locate these settings and files and create a Migration Rule INF file for them.

  4. Run ScanState.exe, copying the user state data to an intermediate store. You can send a shortcut to the script to the users and instruct them to run it when they leave for the evening, or you can deploy the script automatically or on a schedule.

  5. Reformat the disk and install Windows XP Professional and any necessary applications. This can be automated by using disk-imaging software.

  6. Run LoadState.exe as administrator to restore the user settings. (You can do this as a scheduled task running in the administrator context.) When the user logs on, the last of their user state data is reset.

The remainder of this paper explains the syntax and usage of the User State Migration Tool.

ScanState.exe Syntax

This section explains the syntax and usage of ScanState.exe.

scanstate [/c /i input.inf]* [/l scanstate.log]  
 [/v verbosity_level] [/f] [/u] [/x] migration_path  

Table 1 Using ScanState.exe

Flag

Resulting Action

/c

Continues past filename_ too_long errors. Log files in Longfile.log.

/i

Specifies an INF file containing rules that define which user state data to collect. Multiple INF files can be specified.

/l

Specifies a file in which to log errors.

/v

Enables verbose output. The syntax is /v # where # is 1 to 7, with 1 being the least verbose, and 7 the most.

/u

Specifies that user settings will be migrated. This is a switch for troubleshooting only.

/f

Specifies that files will be migrated. This is a switch for troubleshooting only.

/x

Specifies that no files or settings should be migrated.

 

Note: The migration_path is a path to the location where files should be read/written.

For example:

scanstate \\fileserver\migration\elizabeth /i .\migapp.inf /i .\migsys.inf /I  
.\miguser.inf /i .\sysfiles.inf /i .\files.inf 

By default, user settings, system settings, and files are migrated. Use the /u, /f, and /x flags only for troubleshooting. Multiple Migrate Rule INF files can be specified. If you specify more than one, the Sysfiles.inf Migration Rule INF file must be included.

LoadState.exe Syntax

This section explains the syntax and usage of LoadState.exe.

loadstate [/i input.inf]* [/l loadstate.log] [/v #] [/f] [/u] [/x] migration_path  

Table 2 Using LoadState.exe

Flag

Resulting Action

/i

Specifies an INF file containing rules to define what state to migrate. Multiple INF files can be specified.

/l

Specifies a file in which to log errors.

/v

Enables verbose output. The syntax is /v # where # is 1 to 7, with 1 being the least verbose, and 7 the most.

/x

Specifies that no files or settings will be migrated. This is a switch for troubleshooting only.

/u

Specifies that user settings will be migrated. This is a switch for troubleshooting only.

/f

Specifies that files will be migrated. This is a switch for troubleshooting only.

 

Note: migration_path is a path to the location from which the files should be read.

For example:

loadstate \\fileserver\migration\elizabeth /i .\miguser.inf  

By default, user settings, system settings, and files are migrated. The /u, /f, and /x flags should only be used for troubleshooting. Multiple migrate rule INF files can be specified.

Modifying the Migration Rule INF File

This section explains the rules and syntax for Migration Rule INF files (Migapp.inf, Miguser.inf, Migsys.inf and Sysfiles.inf). Only administrators who are familiar with scripting and the registry should attempt to modify the default Migration Rule INF file. You should thoroughly test the INF file after any modifications.

Special Folder and Environment Variable Support

The Migration Rule INF file supports path substitutions for the special folders defined by the CSIDL value set. When the name of the CSIDL is inserted between percent marks in the INF file, (for example %CSIDL_SYSTEM% or %CSIDL_PERSONAL%), USMT uses them. Any environment variables are also supported if the user and administrator define them the same.

For example:

%CSIDL_PERSONAL%\*.txt would match C:\Documents and Settings  

File Include Rules

Additional files and folders can be included in the migration by adding a CopyFiles label to the [Copy This State] section of a Migration Rule INF file. The CopyFiles label is followed by a section name. The section contains the files and folders to be migrated to the destination machine.

For example:

[Copy This State]  
CopyFiles=Copy Trip Reports  
[Copy Trip Reports]  
; The next line copies the TripRpts folder non-recursing  
DIR=C:\TripRpts  
; The next line copies everything in the TrpRpts folder–recursing ONLY  
DIR=C:\TripRpts\*  
; The next line copies all files on the user's desktop in a folder called TripRpts  
; matching the 99*.DOC wildcard search.  
%CSIDL_DESKTOP%\TripRpts\99*.DOC  

File Exclude Rules

If you do not want to migrate some files or folders, add a DelFiles label to the [Copy This State] section of a Migration Rule INF file to have those files and folders excluded from the migration. The DelFiles label is followed by a section name. The section contains the files and folders that must not be copied to the destination. If ScanState.exe was originally going to copy the specified items, now it does not. Note that the file and folder specified in this section are not actually deleted from the either the original or destination computer.

For example:

[Copy This State]  
DelFiles=Trip Reports DelFiles  
[Trip Reports DelFiles]  
; We don't want to migrate the July '99 trip report  
%CSIDL_DEKSTOP%\TripRpts\9907*.DOC  

Write to a Different Location Than Read

Often migration is used to move towards a more managed desktop. To this end, administrators want to move many of the user's documents into the My Documents folder, CSIDL_PERSONAL. This is accomplished by adding the destination folder on the target computer to the end of a CopyFiles section. This new folder is used as the root for the files. You can also copy to folders other than "My Documents" by re-rooting to the destination folder. Direct naming (such as C:\DATA) is supported. For more information about moving files, see "Registry Move and Copy Rules" below.

For example:

[Copy This State]  
CopyFiles=Copy Trip Reports  
[Copy Trip Reports]  
; The next line copies the TripRpts folder  
DIR=C:\TripRpts, %CSIDL_PERSONAL%  
; The next line copies everything in the TrpRpts folder  
DIR=C:\TripRpts\*, %CSIDL_PERSONAL%  
; The next line copies all files on the user's desktop in a folder called ; TripRpts  
; matching the 99*.DOC wildcard search.  
%CSIDL_DESKTOP%\TripRpts\99*.DOC, %CSIDL_PERSONAL%  

In the previous example all of the files are moved to the user's My Documents folder indicated by CSIDL_PERSONAL. The C:\TripRpts folder would be relocated under My Documents. (C:\Documents and Settings\<username>\My Documents\TripRpts).

Wildcards

The Migration Rule INF file supports Microsoft® MS-DOS® style wildcard searches with a few extensions. For example, the character * matches zero or more characters, ? matches a single character. If the pattern string contains back slashes, the fully qualified path name of the target file is matched against the pattern; otherwise, only the file name+extension portion is matched. Multiple wildcard characters are allowed in the pattern string. If the pattern is intended to match a directory only, it should have a dir=tag statement at the beginning of the line.

Examples:

  • C:\TripRpts\2000\August.* matches c:\TripRpts\2000\august.doc and c:\TripRpts\2000\august.xls.

  • It does not match c:\TripRpts\august.doc.

  • August.* matches c:\TripRpts\2000\august.doc, c:\TripRpts\2000\august.txt, and c:\TripRpts\august.doc.

  • *.doc matches c:\TripRpts\2000\august.doc and c:\TripRpts\august.doc.

  • c:\*\2000\*.* matches c:\TripRpts\2000\august.doc, c:\TripRpts\2000\august.txt, and c:\ExpenseRpts\2000\morefiles.ext.

  • c:\TripRpts matches a file named c:\TripRpts but not a directory named c:\TripRpts.

  • dir=c:\TripRpts matches directory TripRpts but not file TripRpts.

  • To get all DOC files on the system, use *.doc.

  • To get all DOC files on drive c:\, use c:\.doc or c:\*\*.doc.

    Settings\%username%\My Documents\august.txt   

Registry Include Rules

Additional registry entries or even entire registry subtrees can be included in the migration by adding an AddReg label to the [Copy This State] section of a Migration Rule INF file. The AddReg label is followed by a section name. The section contains registry subkeys and entries to be copied to the destination computer. These entries will overwrite any corresponding registry entries on the destination computer.

For example:

[Copy This State]  
AddReg=SpaceCadet AddReg  
[SpaceCadet AddReg]  
HKR\Software\Microsoft\Plus!\Pinball\ SpaceCadet\*=  

Registry Exclude Rules

If some entries should not be migrated, add a DelReg label to the [Copy This State] section of a Migration Rule INF file. The DelReg label is followed by a section name. The section contains registry entries that should not be copied to the destination.

Note: Using this rule does not actually delete any entries from the destination computer.

For example:

[Copy This State]  
DelReg=SpaceCadet DelReg  
[SpaceCadet DelReg]  
HKR\Software\Microsoft\Plus!\Pinball\ SpaceCadet [Table Exe]=  

Registry Move and Copy Rules

Often, a registry entry must be moved during the migration. If upgrading from Windows 95 or Windows 98 to Windows XP Professional, most registry subkeys and entries must be changed, moved, deleted, or added. This is done by adding the RenReg label in the [Copy This State] section. The RenReg label is followed by a section name. This section contains registry entries to be copied to the destination machine and renamed or moved.

For example:

[Copy This State]  
RenReg= Outlook98&97 RenReg  
[Outlook98&97 RenReg]  
HKR\Software\Microsoft\Windows Messaging Subsystem\Profiles\*= \  
HKR\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles 

Note: When a back slash (\) is the last character on a line in a Migration Rule INF file, it indicates that the command continues on the next line.

When the value of a registry entry is a pointer to a file that also needs to be migrated, the RegFile label in the [Copy This State] section can copy the file indicated by the registry value. The RegFile label is followed by a section name. This section contains registry entries. Each entry listed must contain a file name. All file names listed are copied to the destination computer. The file path in the entry on the destination computer is set to the actual location of the file (in case the file was moved). An entry can be listed under both the RenReg and RegFile sections. RegFile can also move files.

For example:

[Copy This State]  
RegFile=Desktop RegFile  
[Desktop RegFile]  
HKR\Control Panel\Desktop [Wallpaper]=  
; This next line would move the wallpaper image to My Documents.  
; You would NOT have both of these in the same file.  
HKR\Control Panel\Desktop [Wallpaper]=, %CSIDL_PERSONAL%  

Rule Precedence

When multiple rules can be applied to the same file or folder, an algorithm is used to find the best matching rule. In general, the one that most closely describes the file or folder in question wins. If two rules describe the file or folder equally well, the INCLUDE rule wins. The full path and file name are considered when trying to find the closest match. Equally matching rules often have unexpected results. Registry rules are applied in the following order:

  • DelReg can be specified to ScanState.exe or LoadState.exe.

  • AddReg, RenReg, and RegFile can be specified to either ScanState.exe or LoadState.exe. However, if they are specified to LoadState.exe and not ScanState.exe, the specified entry might not be copied. In the case of RegFile, the file might not be copied.

  • Anything listed under DelReg is not copied to the destination computer.

  • Anything listed under RenReg is renamed. If the same key is listed multiple times, only one rename rule applies.

  • Anything listed under RegFile must have the path in the value fixed. Listing an entry under RegFile multiple times is the same as listing it once.

  • Anything listed under AddReg overwrites the corresponding key on the destination computer. Listing an entry multiple times is the same as listing it once.

  • If an entry exists on the destination computer, it is not overwritten (unless the entry is listed in an AddReg section).

    An entry can have one rule from each of the set of RenReg, RegFile, and AddReg rules. In that case, all the specified rules are applied simultaneously. However, all rules applied simultaneously must be at the same depth in the path. For example, you might apply an AddReg and RenReg rule to the HKEY_LOCAL_MACHINE \Software \Microsoft \Exchange* subkey. If you applied an AddReg rule to the HKEY_LOCAL_MACHINE \Software \Microsoft \Exchange* subkey and a RenReg rule to the HKEY_LOCAL_MACHINE \Software \Microsoft \Exchange \Client subkey, the RenReg rule takes precedence because it provides the more specific description.

Summary

This article explains the context and role of the migration tools in Windows XP: The Files and Settings Transfer Wizard and the User State Migration Tool (USMT).

The Files and Settings Transfer Wizard is designed for home users and small office users. The wizard is also useful in a corporate network environment for employees who get a new computer and need to migrate their own files and settings without the support of an IT department or Helpdesk. For detailed steps on using the wizard, see the companion paper "Step-by-Step Guide to Migrating Files and Settings" at http://www.microsoft.com/technet/prodtechnol/winxppro/deploy/mgrtfset.mspx

The User State Migration Tool is designed for IT administrators in performing large deployments of Windows XP Professional in a corporate environment. USMT provides the same functionality as the wizard, but on a large scale targeted at migrating multiple users. USMT gives administrators command line precision in customizing specific settings such as unique modifications to the registry.

In addition, this article addresses how IT pros can modify INF files.

Related Links

See the following related deployment papers on Windows XP.

For the latest information about Windows XP, check out our Web site at http://www.microsoft.com/technet/community/chats/trans/default.mspx.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft