Share via

Offline Migration

Applies To: Windows 7

Offline migration is a new scenario in Windows® User State Migration Tool (USMT) 4.0 which enables the ScanState tool to run inside a different Windows® operating system than the Windows operating system from which ScanState is gathering files and settings. There are two primary offline scenarios enabled in USMT 4.0:

  • Windows PE. The ScanState tool can be run from within Windows PE, gathering files and settings from the offline Windows operating system on that machine.

  • Windows.old. The ScanState tool can now gather files and settings from the Windows.old directory that is created during Windows installation on a partition that contains a previous installation of Windows. For example, the ScanState tool can run in Windows® 7, gathering files from the previous Windows Vista® installation contained in the Windows.old directory.

This new feature in USMT 4.0 has a direct impact on reducing the cost of deploying Windows 7, when USMT is being used to gather and restore user state, by:

  • Reducing complexity. In computer-refresh scenarios, migrations from the Windows.old directory reduce complexity by eliminating the need for the ScanState tool to be run before the operating system is deployed. Also, migrations from the Windows.old directory enable ScanState and LoadState to be run successively.

  • Improving performance. When USMT runs in an offline Windows PE environment, it has better access to the hardware resources. This may increase performance on older machines with limited hardware resources and numerous installed software applications.

  • New recovery scenario. In scenarios where a machine no longer restarts properly, it might be possible to gather user state with the ScanState tool from within Windows PE.

What Will Migrate Offline?

The following user data and settings migrate offline, similar to an online migration:

  • Data and registry keys specified in MigXML

  • User accounts

  • Application settings

  • Limited set of operating-system settings

  • EFS files

  • Internet Explorer® Favorites

For exceptions to what you can migrate offline, see What Does USMT Migrate?

What Offline Environments are Supported?

The following table defines the only supported combination of online and offline operating systems in USMT 4.0.

Running Operating System Offline Operating System

Windows PE 2.0 or greater, with the MSXML library

Windows® XP, Windows Vista®, Windows 7

Windows® 7

Windows.old directory


It is possible to run the ScanState tool while the drive remains encrypted by suspending Windows® BitLocker™ Drive Encryption before booting into Windows PE. For more information, see this Microsoft Web site.

User-Group Membership and Profile Control

User-group membership is not preserved during offline migrations. You must configure a <ProfileControl> section in the Config.xml file to specify the groups that the migrated users should be made members of. The following example places all migrated users into the Users group:

         <changeGroup from="*" to="Users" appliesTo="MigratedUsers">

Command-Line Options

An offline migration can either be enabled by using a configuration file on the command line, or by using one of the following command line options:

Component Option Description


/offline:<path to offline.xml>

This command-line option enables the offline-migration mode and requires a path to an Offline.xml configuration file.


/offlineWinDir:<Windows directory>

This command-line option enables the offline-migration mode and starts the migration from the location specified. It is only for use in Windows PE offline scenarios where the migration is occurring from a Windows directory.


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

You can use only one of the /offline, /offlineWinDir, or /OfflineWinOld command-line options at a time; USMT does not support using more than one together.

Environment Variables

The following system environment variables are necessary in the scenarios outlined below.

Variable Value Scenario


Full path to a working directory

Required when USMT binaries are located on read-only media, which does not support the creation of log files or temporary storage. To set the system environment variable, at a command prompt type the following:

Set USMT_WORKING_DIR=[path to working directory]


32 or 64

While operating offline, this environment variable defines the architecture of the offline system, if the system does not match the Windows PE and Scanstate.exe architecture. This environment variable enables the 32-bit ScanState application to gather data from a computer with 64-bit architecture, or the 64-bit ScanState application to gather data from a computer with 32-bit architecture. This is required when auto-detection of the offline architecture doesn’t function properly, for example, when the source system is running a 64-bit version of Windows XP. For example, to set this system environment variable for a 32-bit architecture, at a command prompt type the following:


Offline.xml Elements

Use an offline.xml file when running the ScanState tool on a computer that has multiple Windows directories. The offline.xml file specifies which directories to scan for windows files. An offline.xml file can be used with the /offline option as an alternative to specifying a single Windows directory path with the /offlineDir option.


This element contains other elements that define how an offline migration is to be performed.

Syntax: <offline> </offline>


This element is a required child of <offline> and contains information about how the offline volume can be selected. The migration will be performed from the first element of <winDir> that contains a valid Windows system volume.

Syntax: < winDir > </ winDir >


This element is a required child of <winDir> and contains a file path pointing to a valid Windows directory. Relative paths are interpreted from the ScanState tool’s working directory.

Syntax: <path> c:\windows </path>


Syntax, when used with the <mappings> element: <path> C:\, D:\ </path>


This element is an optional child of <offline>. When specified, the <mappings> element will override the automatically detected Windows PE drive mappings. Each child <path> element will provide a mapping from one system volume to another. Additionally, mappings between folders can be provided, since an entire volume can be mounted to a specific folder.

Syntax: <mappings> </mappings>


This element is an optional child of <offline>. The <failOnMultipleWinDir> element allows the user to specify that the migration should fail when USMT detects that there are multiple instances of Windows installed on the source machine. When the <failOnMultipleWinDir> element isn’t present, the default behavior is that the migration does not fail.

Syntax: <failOnMultipleWinDir>1</failOnMultipleWinDir> or Syntax: <failOnMultipleWinDir>0</failOnMultipleWinDir>

Offline .xml Example

The following XML example illustrates some of the elements discussed earlier in this topic.


See Also


Plan Your Migration