diff --git a/windows/deployment/usmt/usmt-requirements.md b/windows/deployment/usmt/usmt-requirements.md index 9134680979..5df90fe4bb 100644 --- a/windows/deployment/usmt/usmt-requirements.md +++ b/windows/deployment/usmt/usmt-requirements.md @@ -16,10 +16,8 @@ ms.topic: article # USMT Requirements - ## In This Topic - - [Supported Operating Systems](#bkmk-1) - [Windows PE](#windows-pe) - [Credentials](#credentials) @@ -30,63 +28,21 @@ ms.topic: article ## Supported Operating Systems - The User State Migration Tool (USMT) 10.0 does not have any explicit RAM or CPU speed requirements for either the source or destination computers. If your computer complies with the system requirements of the operating system, it also complies with the requirements for USMT. You need an intermediate store location large enough to hold all of the migrated data and settings, and the same amount of hard disk space on the destination computer for the migrated files and settings. The following table lists the operating systems supported in USMT. - +|Operating Systems|ScanState (source computer)|LoadState (destination computer)| +|--- |--- |--- | +|32-bit versions of Windows 7|✔️|✔️| +|64-bit versions of Windows 7|✔️|✔️| +|32-bit versions of Windows 8|✔️|✔️| +|64-bit versions of Windows 8|✔️|✔️| +|32-bit versions of Windows 10|✔️|✔️| +|64-bit versions of Windows 10|✔️|✔️| ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Operating SystemsScanState (source computer)LoadState (destination computer)

32-bit versions of Windows 7

X

X

64-bit versions of Windows 7

X

X

32-bit versions of Windows 8

X

X

64-bit versions of Windows 8

X

X

32-bit versions of Windows 10

X

X

64-bit versions of Windows 10

X

X

- - - -**Note**   -You can migrate a 32-bit operating system to a 64-bit operating system. However, you cannot migrate a 64-bit operating system to a 32-bit operating system. +> [!NOTE] +> You can migrate a 32-bit operating system to a 64-bit operating system. However, you cannot migrate a 64-bit operating system to a 32-bit operating system. USMT does not support any of the Windows Server® operating systems, Windows 2000, Windows XP, or any of the starter editions for Windows Vista or Windows 7. @@ -100,7 +56,7 @@ For more information about previous releases of the USMT tools, see [User State ## Credentials - **Run as administrator** - When manually running the **ScanState** and **LoadState** tools on Windows 7, Windows 8 or Windows 10 you must run them from an elevated command prompt to ensure that all specified users are migrated. If you do not run USMT from an elevated prompt, only the user profile that is logged on will be included in the migration. + When manually running the **ScanState** and **LoadState** tools on Windows 7, Windows 8, or Windows 10 you must run them from an elevated command prompt to ensure that all specified users are migrated. If you do not run USMT from an elevated prompt, only the user profile that is logged on will be included in the migration. To open an elevated command prompt: @@ -110,8 +66,8 @@ To open an elevated command prompt: 3. Right-click **cmd** or **Command Prompt**, and then click **Run as administrator**. 4. If the current user is not already an administrator, you will be prompted to enter administrator credentials. -**Important**
-You must run USMT using an account with full administrative permissions, including the following privileges: +> [!IMPORTANT] +> You must run USMT using an account with full administrative permissions, including the following privileges: - SeBackupPrivilege (Back up files and directories) - SeDebugPrivilege (Debug programs) @@ -119,11 +75,10 @@ You must run USMT using an account with full administrative permissions, includi - SeSecurityPrivilege (Manage auditing and security log) - SeTakeOwnership Privilege (Take ownership of files or other objects) - ## Config.xml - **Specify the /c option and <ErrorControl> settings in the Config.xml file.**
- USMT will fail if it cannot migrate a file or setting, unless you specify the **/c** option. When you specify the **/c** option, USMT logs an error each time it encounters a file that is in use that did not migrate, but the migration will not be interrupted. In USMT, you can specify in the Config.xml file which types of errors should allow the migration to continue, and which should cause the migration to fail. For more information about error reporting, and the **<ErrorControl>** element, see [Config.xml File](usmt-configxml-file.md), [Log Files](usmt-log-files.md), and [XML Elements Library](usmt-xml-elements-library.md). + USMT will fail if it cannot migrate a file or setting, unless you specify the **/c** option. When you specify the **/c** option, USMT logs an error each time it encounters a file that is in use that did not migrate, but the migration will not be interrupted. In USMT, you can specify in the Config.xml file, which types of errors should allow the migration to continue, and which should cause the migration to fail. For more information about error reporting, and the **<ErrorControl>** element, see [Config.xml File](usmt-configxml-file.md), [Log Files](usmt-log-files.md), and [XML Elements Library](usmt-xml-elements-library.md). ## LoadState @@ -132,12 +87,10 @@ You must run USMT using an account with full administrative permissions, includi ## Hard-Disk Requirements - Ensure that there is enough available space in the migration-store location and on the source and destination computers. For more information, see [Estimate Migration Store Size](usmt-estimate-migration-store-size.md). ## User Prerequisites - This documentation assumes that IT professionals using USMT understand command-line tools. The documentation also assumes that IT professionals using USMT to author MigXML rules understand the following: - The navigation and hierarchy of the Windows registry. @@ -147,10 +100,6 @@ This documentation assumes that IT professionals using USMT understand command-l ## Related topics - [Plan Your Migration](usmt-plan-your-migration.md)
[Estimate Migration Store Size](usmt-estimate-migration-store-size.md)
[User State Migration Tool (USMT) Overview Topics](usmt-topics.md)
- - - diff --git a/windows/deployment/usmt/usmt-return-codes.md b/windows/deployment/usmt/usmt-return-codes.md index 44089d6d19..b10a808b61 100644 --- a/windows/deployment/usmt/usmt-return-codes.md +++ b/windows/deployment/usmt/usmt-return-codes.md @@ -16,14 +16,12 @@ ms.topic: article # Return Codes - This topic describes User State Migration Tool (USMT) 10.0 return codes and error messages. Also included is a table listing the USMT return codes with their associated mitigation steps. In addition, this topic provides tips to help you use the logfiles to determine why you received an error. Understanding the requirements for running USMT can help minimize errors in your USMT migrations. For more information, see [USMT Requirements](usmt-requirements.md). ## In This Topic - [USMT Return Codes](#bkmk-returncodes) [USMT Error Messages](#bkmk-errormessages) @@ -32,7 +30,6 @@ Understanding the requirements for running USMT can help minimize errors in your ## USMT Return Codes - If you encounter an error in your USMT migration, you can use return codes and the more specific information provided in the associated USMT error messages to troubleshoot the issue and to identify mitigation steps. Return codes are grouped into the following broad categories that describe their area of error reporting: @@ -51,731 +48,231 @@ As a best practice, we recommend that you set verbosity level to 5, **/v**:5 ## USMT Error Messages - Error messages provide more detailed information about the migration problem than the associated return code. For example, the **ScanState**, **LoadState**, or **USMTUtils** tool might return a code of "11” (for “USMT\_INVALID\_PARAMETERS") and a related error message that reads "/key and /keyfile both specified". The error message is displayed at the command prompt and is identified in the **ScanState**, **LoadState**, or **USMTUtils** log files to help you determine why the return code was received. You can obtain more information about any listed Windows application programming interface (API) system error codes by typing **net helpmsg** on the command line and, then typing the error code number. For more information about System Error Codes, see [this Microsoft Web site](/windows/win32/debug/system-error-codes--0-499-). ## Troubleshooting Return Codes and Error Messages +The following information lists each return code by numeric value, along with the associated error messages and suggested troubleshooting actions. -The following table lists each return code by numeric value, along with the associated error messages and suggested troubleshooting actions. +- **0: USMT_SUCCESS** + - **Error message**: Successful run - ------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Return code valueReturn codeError messageTroubleshooting, mitigation, workaroundsCategory

0

USMT_SUCCESS

Successful run

Not applicable

Success or Cancel

1

USMT_DISPLAY_HELP

Command line help requested

Not applicable

Success or Cancel

2

USMT_STATUS_CANCELED

Gather was aborted because of an EFS file

Not applicable

User chose to cancel (such as pressing CTRL+C)

Not applicable

Success or Cancel

3

USMT_WOULD_HAVE_FAILED

At least one error was skipped as a result of /c

Review ScanState, LoadState, or UsmtUtils log for details about command-line errors.

11

USMT_INVALID_PARAMETERS

/all conflicts with /ui, /ue or /uel

Review ScanState log or LoadState log for details about command-line errors.

/auto expects an optional parameter for the script folder

Review ScanState log or LoadState log for details about command-line errors.

/encrypt can't be used with /nocompress

Review ScanState log or LoadState log for details about command-line errors.

/encrypt requires /key or /keyfile

Review ScanState log or LoadState log for details about command-line errors.

/genconfig can't be used with most other options

Review ScanState log or LoadState log for details about command-line errors.

/genmigxml can't be used with most other options

Review ScanState log or LoadState log for details about command-line errors.

/hardlink requires /nocompress

Review ScanState log or LoadState log for details about command-line errors.

/key and /keyfile both specified

Review ScanState log or LoadState log for details about command-line errors.

/key or /keyfile used without enabling encryption

Review ScanState log or LoadState log for details about command-line errors.

/lae is only used with /lac

Review ScanState log or LoadState log for details about command-line errors.

/listfiles cannot be used with /p

Review ScanState log or LoadState log for details about command-line errors.

/offline requires a valid path to an XML file describing offline paths

Review ScanState log or LoadState log for details about command-line errors.

/offlinewindir requires a valid path to offline windows folder

Review ScanState log or LoadState log for details about command-line errors.

/offlinewinold requires a valid path to offline windows folder

Review ScanState log or LoadState log for details about command-line errors.

A command was already specified

Verify that the command-line syntax is correct and that there are no duplicate commands.

An option argument is missing

Review ScanState log or LoadState log for details about command-line errors.

An option is specified more than once and is ambiguous

Review ScanState log or LoadState log for details about command-line errors.

By default /auto selects all users and uses the highest log verbosity level. Switches like /all, /ui, /ue, /v are not allowed.

Review ScanState log or LoadState log for details about command-line errors.

Command line arguments are required. Specify /? for options.

Review ScanState log or LoadState log for details about command-line errors.

Command line option is not valid

Review ScanState log or LoadState log for details about command-line errors.

EFS parameter specified is not valid for /efs

Review ScanState log or LoadState log for details about command-line errors.

File argument is invalid for /genconfig

Review ScanState log or LoadState log for details about command-line errors.

File argument is invalid for /genmigxml

Review ScanState log or LoadState log for details about command-line errors.

Invalid space estimate path. Check the parameters and/or file system permissions

Review ScanState log or LoadState log for details about command-line errors.

List file path argument is invalid for /listfiles

Review ScanState log or LoadState log for details about command-line errors.

Retry argument must be an integer

Review ScanState log or LoadState log for details about command-line errors.

Settings store argument specified is invalid

Review ScanState log or LoadState log for details about command-line errors. Make sure that the store path is accessible and that the proper permission levels are set.

Specified encryption algorithm is not supported

Review ScanState log or LoadState log for details about command-line errors.

The /efs:hardlink requires /hardlink

Review ScanState log or LoadState log for details about command-line errors.

The /targetWindows7 option is only available for Windows XP, Windows Vista, and Windows 7

Review ScanState log or LoadState log for details about command-line errors.

The store parameter is required but not specified

Review ScanState log or LoadState log for details about command-line errors.

The source-to-target domain mapping is invalid for /md

Review ScanState log or LoadState log for details about command-line errors.

The source-to-target user account mapping is invalid for /mu

Review ScanState log or LoadState log for details about command-line errors.

Undefined or incomplete command line option

Review ScanState log or LoadState log for details about command-line errors.

Invalid Command Lines

Use /nocompress, or provide an XML file path with /p"pathtoafile" to get a compressed store size estimate

Review ScanState log or LoadState log for details about command-line errors.

User exclusion argument is invalid

Review ScanState log or LoadState log for details about command-line errors.

Verbosity level must be specified as a sum of the desired log options: Verbose (0x01), Record Objects (0x04), Echo to debug port (0x08)

Review ScanState log or LoadState log for details about command-line errors.

Volume shadow copy feature is not supported with a hardlink store

Review ScanState log or LoadState log for details about command-line errors.

Wait delay argument must be an integer

Review ScanState log or LoadState log for details about command-line errors.

12

USMT_ERROR_OPTION_PARAM_TOO_LARGE

Command line arguments cannot exceed 256 characters

Review ScanState log or LoadState log for details about command-line errors.

Invalid Command Lines

Specified settings store path exceeds the maximum allowed length of 256 characters

Review ScanState log or LoadState log for details about command-line errors.

13

USMT_INIT_LOGFILE_FAILED

Log path argument is invalid for /l

When /l is specified in the ScanState command line, USMT validates the path. Verify that the drive and other information, for example file system characters, are correct.

Invalid Command Lines

14

USMT_ERROR_USE_LAC

Unable to create a local account because /lac was not specified

When creating local accounts, the command-line options /lac and /lae should be used.

Invalid Command Lines

26

USMT_INIT_ERROR

Multiple Windows installations found

Listfiles.txt could not be created. Verify that the location you specified for the creation of this file is valid.

Setup and Initialization

Software malfunction or unknown exception

Check all loaded .xml files for errors, common error when using /I to load the Config.xml file.

Unable to find a valid Windows directory to proceed with requested offline operation; Check if offline input file is present and has valid entries

Verify that the offline input file is present and that it has valid entries. USMT could not find valid offline operating system. Verify your offline directory mapping.

27

USMT_INVALID_STORE_LOCATION

A store path can't be used because an existing store exists; specify /o to overwrite

Specify /o to overwrite an existing intermediate or migration store.

Setup and Initialization

A store path is missing or has incomplete data

Make sure that the store path is accessible and that the proper permission levels are set.

An error occurred during store creation

Make sure that the store path is accessible and that the proper permission levels are set. Specify /o to overwrite an existing intermediate or migration store.

An inappropriate device such as a floppy disk was specified for the store

Make sure that the store path is accessible and that the proper permission levels are set.

Invalid store path; check the store parameter and/or file system permissions

Invalid store path; check the store parameter and/or file system permissions

The file layout and/or file content is not recognized as a valid store

Make sure that the store path is accessible and that the proper permission levels are set. Specify /o to overwrite an existing intermediate or migration store.

The store path holds a store incompatible with the current USMT version

Make sure that the store path is accessible and that the proper permission levels are set.

The store save location is read-only or does not support a requested storage option

Make sure that the store path is accessible and that the proper permission levels are set.

28

USMT_UNABLE_GET_SCRIPTFILES

Script file is invalid for /i

Check all specified migration .xml files for errors. This is a common error when using /i to load the Config.xml file.

Setup and Initialization

Unable to find a script file specified by /i

Verify the location of your script files, and ensure that the command-line options are correct.

29

USMT_FAILED_MIGSTARTUP

A minimum of 250 MB of free space is required for temporary files

Verify that the system meets the minimum temporary disk space requirement of 250 MB. As a workaround, you can set the environment variable USMT_WORKING_DIR=<path> to redirect the temporary files working directory.

Setup and Initialization

Another process is preventing migration; only one migration tool can run at a time

Check the ScanState log file for migration .xml file errors.

Failed to start main processing, look in log for system errors or check the installation

Check the ScanState log file for migration .xml file errors.

Migration failed because of an XML error; look in the log for specific details

Check the ScanState log file for migration .xml file errors.

Unable to automatically map the drive letters to match the online drive letter layout; Use /offline to provide a mapping table

Check the ScanState log file for migration .xml file errors.

31

USMT_UNABLE_FINDMIGUNITS

An error occurred during the discover phase; the log should have more specific information

Check the ScanState log file for migration .xml file errors.

Setup and Initialization

32

USMT_FAILED_SETMIGRATIONTYPE

An error occurred processing the migration system

Check the ScanState log file for migration .xml file errors, or use online Help by typing /? on the command line.

Setup and Initialization

33

USMT_UNABLE_READKEY

Error accessing the file specified by the /keyfile parameter

Check the ScanState log file for migration .xml file errors, or use online Help by typing /? on the command line.

Setup and Initialization

The encryption key must have at least one character

Check the ScanState log file for migration .xml file errors, or use online Help by typing /? on the command line.

34

USMT_ERROR_INSUFFICIENT_RIGHTS

Directory removal requires elevated privileges

Log on as Administrator, and run with elevated privileges.

Setup and Initialization

No rights to create user profiles; log in as Administrator; run with elevated privileges

Log on as Administrator, and run with elevated privileges.

No rights to read or delete user profiles; log in as Administrator, run with elevated privileges

Log on as Administrator, and run with elevated privileges.

35

USMT_UNABLE_DELETE_STORE

A reboot is required to remove the store

Reboot to delete any files that could not be deleted when the command was executed.

Setup and Initialization

A store path can't be used because it contains data that could not be overwritten

A migration store could not be deleted. If you are using a hardlink migration store you might have a locked file in it. You should manually delete the store, or use USMTUtils /rd command to delete the store.

There was an error removing the store

Review ScanState log or LoadState log for details about command-line errors.

36

USMT_ERROR_UNSUPPORTED_PLATFORM

Compliance check failure; please check the logs for details

Investigate whether there is an active temporary profile on the system.

Setup and Initialization

Use of /offline is not supported during apply

The /offline command was not used while running in the Windows Preinstallation Environment (WinPE).

Use /offline to run gather on this platform

The /offline command was not used while running in WinPE.

37

USMT_ERROR_NO_INVALID_KEY

The store holds encrypted data but the correct encryption key was not provided

Verify that you have included the correct encryption /key or /keyfile.

Setup and Initialization

38

USMT_ERROR_CORRUPTED_NOTENCRYPTED_STORE

An error occurred during store access

Review ScanState log or LoadState log for details about command-line errors. Make sure that the store path is accessible and that the proper permission levels are set.

Setup and Initialization

39

USMT_UNABLE_TO_READ_CONFIG_FILE

Error reading Config.xml

Review ScanState log or LoadState log for details about command-line errors in the Config.xml file.

Setup and Initialization

File argument is invalid for /config

Check the command line you used to load the Config.xml file. You can use online Help by typing /? on the command line.

40

USMT_ERROR_UNABLE_CREATE_PROGRESS_LOG

Error writing to the progress log

The Progress log could not be created. Verify that the location is valid and that you have write access.

Setup and Initialization

Progress log argument is invalid for /progress

The Progress log could not be created. Verify that the location is valid and that you have write access.

41

USMT_PREFLIGHT_FILE_CREATION_FAILED

Can't overwrite existing file

The Progress log could not be created. Verify that the location is valid and that you have write access.

Setup and Initialization

Invalid space estimate path. Check the parameters and/or file system permissions

Review ScanState log or LoadState log for details about command-line errors.

42

USMT_ERROR_CORRUPTED_STORE

The store contains one or more corrupted files

Review UsmtUtils log for details about the corrupted files. For information on how to extract the files that are not corrupted, see Extract Files from a Compressed USMT Migration Store.

61

USMT_MIGRATION_STOPPED_NONFATAL

Processing stopped due to an I/O error

USMT exited but can continue with the /c command-line option, with the optional configurable <ErrorControl> section or by using the /vsc command-line option.

Non-fatal Errors

71

USMT_INIT_OPERATING_ENVIRONMENT_FAILED

A Windows Win32 API error occurred

Data transfer has begun, and there was an error during the creation of migration store or during the apply phase. Review the ScanState log or LoadState log for details.

Fatal Errors

An error occurred when attempting to initialize the diagnostic mechanisms such as the log

Data transfer has begun, and there was an error during the creation of migration store or during the apply phase. Review the ScanState log or LoadState log for details.

Failed to record diagnostic information

Data transfer has begun, and there was an error during the creation of migration store or during the apply phase. Review the ScanState log or LoadState log for details.

Unable to start. Make sure you are running USMT with elevated privileges

Exit USMT and log in again with elevated privileges.

72

USMT_UNABLE_DOMIGRATION

An error occurred closing the store

Data transfer has begun, and there was an error during migration-store creation or during the apply phase. Review the ScanState log or LoadState log for details.

Fatal Errors

An error occurred in the apply process

Data transfer has begun, and there was an error during migration-store creation or during the apply phase. Review the ScanState log or LoadState log for details.

An error occurred in the gather process

Data transfer has begun, and there was an error during migration-store creation or during the apply phase. Review the ScanState log or LoadState log for details.

Out of disk space while writing the store

Data transfer has begun, and there was an error during migration-store creation or during the apply phase. Review the ScanState log or LoadState log for details.

Out of temporary disk space on the local system

Data transfer has begun, and there was an error during migration-store creation or during the apply phase. Review the ScanState log or LoadState log for details.

+- **1: USMT_DISPLAY_HELP** + - **Error message**: Command line help requested - +- **2: USMT_STATUS_CANCELED** + - **Error message**: + - Gather was aborted because of an EFS file + - User chose to cancel (such as pressing CTRL+C) + +- **3: USMT_WOULD_HAVE_FAILED** + - **Error message**: At least one error was skipped as a result of /c. + - **Troubleshooting, mitigation, workarounds**: Review ScanState, LoadState, or UsmtUtils log for details about command-line errors. + +- **11: USMT_INVALID_PARAMETERS** + + | Error message | Troubleshooting, mitigation, workarounds | + | --- | --- | + | /all conflicts with /ui, /ue or /uel | Review ScanState log or LoadState log for details about command-line errors. | + | /auto expects an optional parameter for the script folder | Review ScanState log or LoadState log for details about command-line errors. | + | /encrypt can't be used with /nocompress | Review ScanState log or LoadState log for details about command-line errors. | + | /encrypt requires /key or /keyfile | Review ScanState log or LoadState log for details about command-line errors. | + | /genconfig can't be used with most other options | Review ScanState log or LoadState log for details about command-line errors. | + | /genmigxml can't be used with most other options | Review ScanState log or LoadState log for details about command-line errors. | + | /hardlink requires /nocompress | Review ScanState log or LoadState log for details about command-line errors. | + | /key and /keyfile both specified | Review ScanState log or LoadState log for details about command-line errors. | + | /key or /keyfile used without enabling encryption | Review ScanState log or LoadState log for details about command-line errors. | + | /lae is only used with /lac | Review ScanState log or LoadState log for details about command-line errors. | + | /listfiles cannot be used with /p | Review ScanState log or LoadState log for details about command-line errors. | + | /offline requires a valid path to an XML file describing offline paths | Review ScanState log or LoadState log for details about command-line errors. | + | /offlinewindir requires a valid path to offline windows folder | Review ScanState log or LoadState log for details about command-line errors. | + | /offlinewinold requires a valid path to offline windows folder | Review ScanState log or LoadState log for details about command-line errors. | + | A command was already specified | Verify that the command-line syntax is correct and that there are no duplicate commands. | + | An option argument is missing | Review ScanState log or LoadState log for details about command-line errors. | + | An option is specified more than once and is ambiguous | Review ScanState log or LoadState log for details about command-line errors. | + | By default /auto selects all users and uses the highest log verbosity level. Switches like /all, /ui, /ue, /v are not allowed. | Review ScanState log or LoadState log for details about command-line errors. | + | Command line arguments are required. Specify /? for options. | Review ScanState log or LoadState log for details about command-line errors. | + | Command line option is not valid | Review ScanState log or LoadState log for details about command-line errors. | + | EFS parameter specified is not valid for /efs | Review ScanState log or LoadState log for details about command-line errors. | + | File argument is invalid for /genconfig | Review ScanState log or LoadState log for details about command-line errors. | + | File argument is invalid for /genmigxml | Review ScanState log or LoadState log for details about command-line errors. | + | Invalid space estimate path. Check the parameters and/or file system permissions | Review ScanState log or LoadState log for details about command-line errors. | + | List file path argument is invalid for /listfiles | Review ScanState log or LoadState log for details about command-line errors. | + | Retry argument must be an integer | Review ScanState log or LoadState log for details about command-line errors. | + | Settings store argument specified is invalid | Review ScanState log or LoadState log for details about command-line errors. Make sure that the store path is accessible and that the proper permission levels are set. | + | Specified encryption algorithm is not supported | Review ScanState log or LoadState log for details about command-line errors. | + | The /efs:hardlink requires /hardlink | Review ScanState log or LoadState log for details about command-line errors. | + | The /targetWindows7 option is only available for Windows XP, Windows Vista, and Windows 7 | Review ScanState log or LoadState log for details about command-line errors. | + | The store parameter is required but not specified | Review ScanState log or LoadState log for details about command-line errors. | + | The source-to-target domain mapping is invalid for /md | Review ScanState log or LoadState log for details about command-line errors. | + | The source-to-target user account mapping is invalid for /mu | Review ScanState log or LoadState log for details about command-line errors. | + | Undefined or incomplete command line option | Review ScanState log or LoadState log for details about command-line errors.

Category: Invalid Command Lines| + | Use /nocompress, or provide an XML file path with /p"pathtoafile" to get a compressed store size estimate | Review ScanState log or LoadState log for details about command-line errors. | + | User exclusion argument is invalid | Review ScanState log or LoadState log for details about command-line errors. | + | Verbosity level must be specified as a sum of the desired log options: Verbose (0x01), Record Objects (0x04), Echo to debug port (0x08) | Review ScanState log or LoadState log for details about command-line errors. | + | Volume shadow copy feature is not supported with a hardlink store | Review ScanState log or LoadState log for details about command-line errors. | + | Wait delay argument must be an integer | Review ScanState log or LoadState log for details about command-line errors. | + +- **12: USMT_ERROR_OPTION_PARAM_TOO_LARGE** + + | Error message | Troubleshooting, mitigation, workarounds | + | --- | --- | + | Command line arguments cannot exceed 256 characters | Review ScanState log or LoadState log for details about command-line errors.

Category: Invalid Command Lines | + | Specified settings store path exceeds the maximum allowed length of 256 characters | Review ScanState log or LoadState log for details about command-line errors. | + +- **13: USMT_INIT_LOGFILE_FAILED** + - **Error message**: Log path argument is invalid for /l + - **Troubleshooting, mitigation, workarounds**: When /l is specified in the ScanState command line, USMT validates the path. Verify that the drive and other information, for example file system characters, are correct. + - **Category**: Invalid Command Lines + +- **14: USMT_ERROR_USE_LAC** + - **Error message**: Unable to create a local account because /lac was not specified + - **Troubleshooting, mitigation, workarounds**: When creating local accounts, the command-line options /lac and /lae should be used. + - **Category**: Invalid Command Lines + +- **26: USMT_INIT_ERROR** + + | Error message | Troubleshooting, mitigation, workarounds | + | --- | --- | + | Multiple Windows installations found | Listfiles.txt could not be created. Verify that the location you specified for the creation of this file is valid.

Category: Setup and Initialization | + | Software malfunction or unknown exception | Check all loaded .xml files for errors, common error when using /I to load the Config.xml file. | + | Unable to find a valid Windows directory to proceed with requested offline operation; Check if offline input file is present and has valid entries | Verify that the offline input file is present and that it has valid entries. USMT could not find valid offline operating system. Verify your offline directory mapping. | + +- **27: USMT_INVALID_STORE_LOCATION** + + | Error message | Troubleshooting, mitigation, workarounds | + | --- | --- | + | A store path can't be used because an existing store exists; specify /o to overwrite | Specify /o to overwrite an existing intermediate or migration store.

Category: Setup and Initialization | + | A store path is missing or has incomplete data | Make sure that the store path is accessible and that the proper permission levels are set. | + | An error occurred during store creation | Make sure that the store path is accessible and that the proper permission levels are set. Specify /o to overwrite an existing intermediate or migration store. | + | An inappropriate device such as a floppy disk was specified for the store | Make sure that the store path is accessible and that the proper permission levels are set. | + | Invalid store path; check the store parameter and/or file system permissions | Invalid store path; check the store parameter and/or file system permissions. | + | The file layout and/or file content is not recognized as a valid store | Make sure that the store path is accessible and that the proper permission levels are set. Specify /o to overwrite an existing intermediate or migration store. | + | The store path holds a store incompatible with the current USMT version | Make sure that the store path is accessible and that the proper permission levels are set. | + | The store save location is read-only or does not support a requested storage option | Make sure that the store path is accessible and that the proper permission levels are set. | + +- **28: USMT_UNABLE_GET_SCRIPTFILES** + + | Error message | Troubleshooting, mitigation, workarounds | + | --- | --- | + | Script file is invalid for /i | Check all specified migration .xml files for errors. This is a common error when using /i to load the Config.xml file.

Category: Setup and Initialization | + | Unable to find a script file specified by /i | Verify the location of your script files, and ensure that the command-line options are correct. | + +- **29: USMT_FAILED_MIGSTARTUP** + + | Error message | Troubleshooting, mitigation, workarounds | + | --- | --- | + | A minimum of 250 MB of free space is required for temporary files | Verify that the system meets the minimum temporary disk space requirement of 250 MB. As a workaround, you can set the environment variable `USMT_WORKING_DIR=` to redirect the temporary files working directory.

Category: Setup and Initialization | + | Another process is preventing migration; only one migration tool can run at a time | Check the ScanState log file for migration .xml file errors. | + | Failed to start main processing, look in log for system errors or check the installation | Check the ScanState log file for migration .xml file errors. | + | Migration failed because of an XML error; look in the log for specific details | Check the ScanState log file for migration .xml file errors. | + | Unable to automatically map the drive letters to match the online drive letter layout; Use /offline to provide a mapping table | Check the ScanState log file for migration .xml file errors. | + +- **31: USMT_UNABLE_FINDMIGUNITS** + + - **Error message**: An error occurred during the discover phase; the log should have more specific information + - **Troubleshooting, mitigation, workarounds**: Check the ScanState log file for migration .xml file errors. + - **Category**: Setup and Initialization + +- **32: USMT_FAILED_SETMIGRATIONTYPE** + - **Error message**: An error occurred processing the migration system + - **Troubleshooting, mitigation, workarounds**: Check the ScanState log file for migration .xml file errors, or use online Help by typing /? on the command line. + - **Category**: Setup and Initialization + +- **33: USMT_UNABLE_READKEY** + + | Error message | Troubleshooting, mitigation, workarounds | + | --- | --- | + | Error accessing the file specified by the /keyfile parameter | Check the ScanState log file for migration .xml file errors, or use online Help by typing /? on the command line.

Category: Setup and Initialization | + | The encryption key must have at least one character | Check the ScanState log file for migration .xml file errors, or use online Help by typing /? on the command line. | + +- **34: USMT_ERROR_INSUFFICIENT_RIGHTS** + + | Error message | Troubleshooting, mitigation, workarounds | + | --- | --- | + | Directory removal requires elevated privileges | Log on as Administrator, and run with elevated privileges.

Category: Setup and Initialization | + | No rights to create user profiles; log in as Administrator; run with elevated privileges | Log on as Administrator, and run with elevated privileges. | + | No rights to read or delete user profiles; log in as Administrator, run with elevated privileges | Log on as Administrator, and run with elevated privileges. | + +- **35: USMT_UNABLE_DELETE_STORE** + + | Error message | Troubleshooting, mitigation, workarounds | + | --- | --- | + | A reboot is required to remove the store | Reboot to delete any files that could not be deleted when the command was executed.

Category: Setup and Initialization | + | A store path can't be used because it contains data that could not be overwritten | A migration store could not be deleted. If you are using a hardlink migration store you might have a locked file in it. You should manually delete the store, or use **USMTUtils /rd** command to delete the store. | + | There was an error removing the store | Review ScanState log or LoadState log for details about command-line errors. | + +- **36: USMT_ERROR_UNSUPPORTED_PLATFORM** + + | Error message | Troubleshooting, mitigation, workarounds | + | --- | --- | + | Compliance check failure; please check the logs for details | Investigate whether there is an active temporary profile on the system.

Category: Setup and Initialization | + | Use of /offline is not supported during apply | The **/offline** command was not used while running in the Windows Preinstallation Environment (WinPE). | + | Use /offline to run gather on this platform | The **/offline** command was not used while running in WinPE. | + +- **37: USMT_ERROR_NO_INVALID_KEY** + - **Error message**: The store holds encrypted data but the correct encryption key was not provided + - **Troubleshooting, mitigation, workarounds**: Verify that you have included the correct encryption /key or /keyfile. + - **Category**: Setup and Initialization + +- **38: USMT_ERROR_CORRUPTED_NOTENCRYPTED_STORE** + - **Error message**: An error occurred during store access + - **Troubleshooting, mitigation, workarounds**: Review ScanState log or LoadState log for details about command-line errors. Make sure that the store path is accessible and that the proper permission levels are set. + - **Category**: Setup and Initialization + +- **39: USMT_UNABLE_TO_READ_CONFIG_FILE** + + | Error message | Troubleshooting, mitigation, workarounds | + | --- | --- | + | Error reading Config.xml | Review ScanState log or LoadState log for details about command-line errors in the Config.xml file.

Category: Setup and Initialization | + | File argument is invalid for /config | Check the command line you used to load the Config.xml file. You can use online Help by typing /? on the command line. | + +- **40: USMT_ERROR_UNABLE_CREATE_PROGRESS_LOG** + + | Error message | Troubleshooting, mitigation, workarounds | + | --- | --- | + | Error writing to the progress log | The Progress log could not be created. Verify that the location is valid and that you have write access.

Category: Setup and Initialization | + | Progress log argument is invalid for /progress | The Progress log could not be created. Verify that the location is valid and that you have write access. | + +- **41: USMT_PREFLIGHT_FILE_CREATION_FAILED** + + | Error message | Troubleshooting, mitigation, workarounds | + | --- | --- | + | Can't overwrite existing file | The Progress log could not be created. Verify that the location is valid and that you have write access.

Category: Setup and Initialization | + | Invalid space estimate path. Check the parameters and/or file system permissions | Review ScanState log or LoadState log for details about command-line errors. | + +- **42: USMT_ERROR_CORRUPTED_STORE** + - **Error message**: The store contains one or more corrupted files + - **Troubleshooting, mitigation, workarounds**: Review UsmtUtils log for details about the corrupted files. For information on how to extract the files that are not corrupted, see [Extract Files from a Compressed USMT Migration Store](usmt-extract-files-from-a-compressed-migration-store.md). + +- **61: USMT_MIGRATION_STOPPED_NONFATAL** + - **Error message**: Processing stopped due to an I/O error + - **Troubleshooting, mitigation, workarounds**: USMT exited but can continue with the /c command-line option, with the optional configurable <ErrorControl> section or by using the /vsc command-line option. + - **Category**: Non-fatal Errors + +- **71: USMT_INIT_OPERATING_ENVIRONMENT_FAILED** + + | Error message | Troubleshooting, mitigation, workarounds | + | --- | --- | + | A Windows Win32 API error occurred | Data transfer has begun, and there was an error during the creation of migration store or during the apply phase. Review the ScanState log or LoadState log for details.

Category: Fatal Errors | + | An error occurred when attempting to initialize the diagnostic mechanisms such as the log | Data transfer has begun, and there was an error during the creation of migration store or during the apply phase. Review the ScanState log or LoadState log for details. | + | Failed to record diagnostic information | Data transfer has begun, and there was an error during the creation of migration store or during the apply phase. Review the ScanState log or LoadState log for details. | + | Unable to start. Make sure you are running USMT with elevated privileges | Exit USMT and log in again with elevated privileges. | + +- **72: USMT_UNABLE_DOMIGRATION** + + | Error message | Troubleshooting, mitigation, workarounds | + | --- | --- | + | An error occurred closing the store | Data transfer has begun, and there was an error during migration-store creation or during the apply phase. Review the ScanState log or LoadState log for details.

Category: Fatal Errors| + | An error occurred in the apply process | Data transfer has begun, and there was an error during migration-store creation or during the apply phase. Review the ScanState log or LoadState log for details. | + | An error occurred in the gather process | Data transfer has begun, and there was an error during migration-store creation or during the apply phase. Review the ScanState log or LoadState log for details. | + | Out of disk space while writing the store | Data transfer has begun, and there was an error during migration-store creation or during the apply phase. Review the ScanState log or LoadState log for details. | + | Out of temporary disk space on the local system | Data transfer has begun, and there was an error during migration-store creation or during the apply phase. Review the ScanState log or LoadState log for details. | ## Related topics - [User State Migration Tool (USMT) Troubleshooting](usmt-troubleshooting.md) [Log Files](usmt-log-files.md) - - - diff --git a/windows/deployment/usmt/usmt-scanstate-syntax.md b/windows/deployment/usmt/usmt-scanstate-syntax.md index eaaf29d214..37fb5cbc81 100644 --- a/windows/deployment/usmt/usmt-scanstate-syntax.md +++ b/windows/deployment/usmt/usmt-scanstate-syntax.md @@ -16,12 +16,10 @@ ms.topic: article # ScanState Syntax - The ScanState command is used with the User State Migration Tool (USMT) 10.0 to scan the source computer, collect the files and settings, and create a store. ## In This Topic - [Before You Begin](#bkmk-beforeyoubegin) [Syntax](#bkmk-syntax) @@ -40,7 +38,6 @@ The ScanState command is used with the User State Migration Tool (USMT) 10.0 to ## Before You Begin - Before you run the **ScanState** command, note the following: - To ensure that all operating system settings migrate, in most cases you must run the **ScanState** commands in administrator mode from an account with administrative credentials. @@ -59,7 +56,6 @@ Before you run the **ScanState** command, note the following: ## Syntax - This section explains the syntax and usage of the **ScanState** command-line options. The options can be specified in any order. If the option contains a parameter, you can use either a colon or a space separator. The **ScanState** command's syntax is: @@ -76,80 +72,20 @@ To create an encrypted store using the Config.xml file and the default migration ## Storage Options - - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Command-Line OptionDescription

StorePath

Indicates a folder where files and settings will be saved. Note that StorePath cannot be C:\. You must specify the StorePath option in the ScanState command, except when using the /genconfig option. You cannot specify more than one StorePath location.

/apps

Scans the image for apps and includes them and their associated registry settings.

/ppkg [<FileName>]

Exports to a specific file location.

/o

Required to overwrite any existing data in the migration store or Config.xml file. If not specified, the ScanState command will fail if the migration store already contains data. You cannot use this option more than once on a command line.

/vsc

This option enables the volume shadow-copy service to migrate files that are locked or in use. This command-line option eliminates most file-locking errors that are typically encountered by the <ErrorControl> section.

-

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

/hardlink

Enables the creation of a hard-link migration store at the specified location. The /nocompress option must be specified with the /hardlink option.

/encrypt [{/key:<KeyString> | /keyfile:<file>]}

Encrypts the store with the specified key. Encryption is disabled by default. With this option, you will need to specify the encryption key-in one of the following ways:

-
    -
  • /key:KeyString specifies the encryption key. If there is a space in KeyString, you will need to surround KeyString with quotation marks.

  • -
  • /keyfile:FilePathAndName specifies a text (.txt) file that contains the encryption key.

  • -
-

We recommend that KeyString be at least eight characters long, but it cannot exceed 256 characters. The /key and /keyfile options cannot be used on the same command line. The /encrypt and /nocompress options cannot be used on the same command line.

-
-Important

You should use caution with this option, because anyone who has access to the ScanState command-line script will also have access to the encryption key.

-
-
- -
-

The following example shows the ScanState command and the /key option:

-

scanstate /i:migdocs.xml /i:migapp.xml \server\share\migration\mystore /encrypt /key:mykey

/encrypt:<EncryptionStrength>

The /encrypt option accepts a command-line parameter to define the encryption strength to be used for encryption of the migration store. For more information about supported encryption algorithms, see Migration Store Encryption.

/nocompress

Disables compression of data and saves the files to a hidden folder named "File" at StorePath\USMT. Compression is enabled by default. Combining the /nocompress option with the /hardlink option generates a hard-link migration store. You can use the uncompressed store to view what USMT stored, troubleshoot a problem, or run an antivirus utility against the files. You should use this option only in testing environments, because we recommend that you use a compressed store during your actual migration, unless you are combining the /nocompress option with the /hardlink option.

-

The /nocompress and /encrypt options cannot be used together in one statement on the command line. However, if you do choose to migrate an uncompressed store, the LoadState command will migrate each file directly from the store to the correct location on the destination computer without a temporary location.

-

For example:

-

scanstate /i:migdocs.xml /i:migapp.xml \server\share\migration\mystore /nocompress

- - +| Command-Line Option | Description | +|-----|-----| +| *StorePath* | Indicates a folder where files and settings will be saved. Note that *StorePath* cannot be **C:\**. You must specify the *StorePath* option in the **ScanState** command, except when using the **/genconfig** option. You cannot specify more than one *StorePath* location. | +| **/apps** | Scans the image for apps and includes them and their associated registry settings. | +| **/ppkg** [*<FileName>*] | Exports to a specific file location. | +| **/o** | Required to overwrite any existing data in the migration store or Config.xml file. If not specified, the **ScanState** command will fail if the migration store already contains data. You cannot use this option more than once on a command line. | +| **/vsc** | This option enables the volume shadow-copy service to migrate files that are locked or in use. This command-line option eliminates most file-locking errors that are typically encountered by the **<ErrorControl>** section.

This option can be used only with the ScanState executable file and cannot be combined with the **/hardlink** option. | +| **/hardlink** | Enables the creation of a hard-link migration store at the specified location. The **/nocompress** option must be specified with the **/hardlink** option. | +| **/encrypt** [{**/key:** *<KeyString>* | **/keyfile**:*<file>*]} | Encrypts the store with the specified key. Encryption is disabled by default. With this option, you will need to specify the encryption key-in one of the following ways:
We recommend that *KeyString* be at least eight characters long, but it cannot exceed 256 characters. The **/key** and **/keyfile** options cannot be used on the same command line. The **/encrypt** and **/nocompress** options cannot be used on the same command line.
**Important**
You should use caution with this option, because anyone who has access to the **ScanState** command-line script will also have access to the encryption key.

The following example shows the ScanState command and the **/key** option:
`scanstate /i:migdocs.xml /i:migapp.xml \server\share\migration\mystore /encrypt /key:mykey` | +| **/encrypt**:*<EncryptionStrength>* | The **/encrypt** option accepts a command-line parameter to define the encryption strength to be used for encryption of the migration store. For more information about supported encryption algorithms, see [Migration Store Encryption](usmt-migration-store-encryption.md). | +| **/nocompress** | Disables compression of data and saves the files to a hidden folder named "File" at *StorePath*\USMT. Compression is enabled by default. Combining the **/nocompress** option with the **/hardlink** option generates a hard-link migration store. You can use the uncompressed store to view what USMT stored, troubleshoot a problem, or run an antivirus utility against the files. You should use this option only in testing environments, because we recommend that you use a compressed store during your actual migration, unless you are combining the **/nocompress** option with the **/hardlink** option.

The **/nocompress** and **/encrypt** options cannot be used together in one statement on the command line. However, if you do choose to migrate an uncompressed store, the **LoadState** command will migrate each file directly from the store to the correct location on the destination computer without a temporary location.

For example:
`scanstate /i:migdocs.xml /i:migapp.xml \server\share\migration\mystore /nocompress` | ## Run the ScanState Command on an Offline Windows System - You can run the **ScanState** command in Windows Preinstallation Environment (WinPE). In addition, USMT 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 WinPE or a Windows.old directory when you run the **ScanState** command in Windows. There are several benefits to running the **ScanState** command on an offline Windows image, including: @@ -172,445 +108,87 @@ There are several benefits to running the **ScanState** command on an offline Wi ## Offline Migration Options - - ---- - - - - - - - - - - - - - - - - - - - - -
Command-Line OptionDefinition

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

This option is used to define a path to an offline .xml file that might specify other offline migration options, for example, an offline Windows directory or any domain or folder redirection required in your migration.

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

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

- - +|Command-Line Option|Definition| +|--- |--- | +|**/offline:** *"path to an offline.xml file"*|This option is used to define a path to an offline .xml file that might specify other offline migration options, for example, an offline Windows directory or any domain or folder redirection required in your migration.| +|**/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 WinPE.| +|**/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.| ## Migration Rule Options - USMT provides the following options to specify what files you want to migrate. - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Command-Line OptionDescription

/i:[Path]FileName

(include)

-

Specifies an .xml file that contains rules that define what user, application, or system state to migrate. You can specify this option multiple times to include all of your .xml files (MigApp.xml, MigDocs.xml, and any custom .xml files that you create). Path can be either a relative or full path. If you do not specify the Path variable, then FileName must be located in the current directory. For more information about which files to specify, see the "XML Files" section of the Frequently Asked Questions topic.

/genconfig:[Path]FileName

(Generate Config.xml)

-

Generates the optional Config.xml file, but does not create a migration store. To ensure that this file contains every component, application and setting that can be migrated, you should create this file on a source computer that contains all the components, applications, and settings that will be present on the destination computers. In addition, you should specify the other migration .xml files, using the /i option, when you specify this option.

-

After you create this file, you will need to make use of it with the ScanState command using the /config option.

-

The only options that you can specify with this option are the /i, /v, and /l options. You cannot specify StorePath, because the /genconfig option does not create a store. Path can be either a relative or full path. If you do not specify the Path variable, then FileName will be created in the current directory.

-

Examples:

-
    -
  • The following example creates a Config.xml file in the current directory:

    -

    scanstate /i:migapp.xml /i:migdocs.xml /genconfig:config.xml /v:13

  • -

/config:[Path</em>]FileName

Specifies the Config.xml file that the ScanState command should use to create the store. You cannot use this option more than once on the command line. Path can be either a relative or full path. If you do not specify the Path variable, then FileName must be located in the current directory.

-

The following example creates a store using the Config.xml file, MigDocs.xml, and MigApp.xml files:

-

scanstate \server\share\migration\mystore /config:config.xml /i:migdocs.xml /i:migapp.xml /v:13 /l:scan.log

-

The following example migrates the files and settings to the destination computer using the Config.xml, MigDocs.xml, and MigApp.xml files:

-

loadstate \server\share\migration\mystore /config:config.xml /i:migdocs.xml /i:migapp.xml /v:13 /l:load.log

/auto:path to script files

This option enables you to specify the location of the default .xml files and then begin the migration. If no path is specified, USMT will reference the directory where the USMT binaries are located. The /auto option has the same effect as using the following options: /i: MigDocs.xml /i:MigApp.xml /v:5.

/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 on the computer on which the ScanState command is running.

/targetwindows8

Optimizes Scanstate.exe when using USMT 10.0 to migrate a user state to Windows 8 or Windows 8.1 instead of Windows 10. You should use this command-line option in the following scenarios:

-
    -
  • To create a Config.xml file by using the /genconfig option. Using the /targetwindows8 option optimizes the Config.xml file so that it only contains components that relate to Windows 8 or Windows 8.1.

  • -
  • To create a migration store. Using the /targetwindows8 option ensures that the ScanState tool gathers the correct set of operating system settings. Without the /targetwindows8 command-line option, some settings can be lost during the migration.

  • -

/targetwindows7

Optimizes Scanstate.exe when using USMT 10.0 to migrate a user state to Windows 7 instead of Windows 10. You should use this command-line option in the following scenarios:

-
    -
  • To create a Config.xml file by using the /genconfig option. Using the /targetwindows7 option optimizes the Config.xml file so that it only contains components that relate to Windows 7.

  • -
  • To create a migration store. Using the /targetwindows7 option ensures that the ScanState tool gathers the correct set of operating system settings. Without the /targetwindows7 command-line option, some settings can be lost during the migration.

  • -

/localonly

Migrates only files that are stored on the local computer, regardless of the rules in the .xml files that you specify on the command line. You should use this option when you want to exclude the data from removable drives on the source computer, such as USB flash drives (UFDs), some external hard drives, and so on, and when there are network drives mapped on the source computer. If the /localonly option is not specified, then the ScanState command will copy files from these removable or network drives into the store.

-

Anything that is not considered a fixed drive by the OS will be excluded by /localonly. In some cases large external hard drives are considered fixed drives. These drives can be explicitly excluded from migration by using a custom.xml file. For more information about how to exclude all files on a specific drive, see Exclude Files and Settings.

-

The /localonly command-line option includes or excludes data in the migration as identified in the following table:

- ---- - - - - - - - - - - - - - - - - - - - - -
Drive typeBehavior with /localonly

Removable drives such as a USB flash drive

Excluded

Network drives

Excluded

Fixed drives

Included

-

- - +| Command-Line Option | Description | +|-----|-----| +| **/i:**[*Path*]*FileName* | **(include)**

Specifies an .xml file that contains rules that define what user, application, or system state to migrate. You can specify this option multiple times to include all of your .xml files (MigApp.xml, MigDocs.xml, and any custom .xml files that you create). *Path* can be either a relative or full path. If you do not specify the *Path* variable, then *FileName* must be located in the current directory. For more information about which files to specify, see the "XML Files" section of the [Frequently Asked Questions](usmt-faq.yml) topic. | +| **/genconfig:**[*Path*]*FileName* | (Generate **Config.xml**)

Generates the optional Config.xml file, but does not create a migration store. To ensure that this file contains every component, application and setting that can be migrated, you should create this file on a source computer that contains all the components, applications, and settings that will be present on the destination computers. In addition, you should specify the other migration .xml files, using the **/i** option, when you specify this option.

After you create this file, you will need to make use of it with the **ScanState** command using the **/config** option.

The only options that you can specify with this option are the **/i**, **/v**, and **/l** options. You cannot specify *StorePath*, because the **/genconfig** option does not create a store. *Path* can be either a relative or full path. If you do not specify the *Path* variable, then *FileName* will be created in the current directory.

Examples: | +| **/config:**[*Path*]*FileName* | Specifies the Config.xml file that the **ScanState** command should use to create the store. You cannot use this option more than once on the command line. *Path* can be either a relative or full path. If you do not specify the *Path* variable, then *FileName* must be located in the current directory.

The following example creates a store using the Config.xml file, MigDocs.xml, and MigApp.xml files:
`scanstate \server\share\migration\mystore /config:config.xml /i:migdocs.xml /i:migapp.xml /v:13 /l:scan.log`

The following example migrates the files and settings to the destination computer using the **Config.xml**, **MigDocs.xml**, and **MigApp.xml** files:
`loadstate \server\share\migration\mystore /config:config.xml /i:migdocs.xml /i:migapp.xml /v:13 /l:load.log` | +| **/auto:** *path to script files* | This option enables you to specify the location of the default .xml files and then begin the migration. If no path is specified, USMT will reference the directory where the USMT binaries are located. The **/auto** option has the same effect as using the following options: **/i: MigDocs.xml** **/i:MigApp.xml /v:5**. | +| **/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 on the computer on which the **ScanState** command is running. | +| **/targetwindows8** | Optimizes Scanstate.exe when using USMT 10.0 to migrate a user state to Windows 8 or Windows 8.1 instead of Windows 10. You should use this command-line option in the following scenarios: | +| **/targetwindows7** | Optimizes Scanstate.exe when using USMT 10.0 to migrate a user state to Windows 7 instead of Windows 10. You should use this command-line option in the following scenarios: | +| **/localonly** | Migrates only files that are stored on the local computer, regardless of the rules in the .xml files that you specify on the command line. You should use this option when you want to exclude the data from removable drives on the source computer, such as USB flash drives (UFDs), some external hard drives, and so on, and when there are network drives mapped on the source computer. If the **/localonly** option is not specified, then the **ScanState** command will copy files from these removable or network drives into the store.

Anything that is not considered a fixed drive by the OS will be excluded by **/localonly**. In some cases large external hard drives are considered fixed drives. These drives can be explicitly excluded from migration by using a custom.xml file. For more information about how to exclude all files on a specific drive, see [Exclude Files and Settings](usmt-exclude-files-and-settings.md).

The **/localonly** command-line option includes or excludes data in the migration as identified in the following:| ## Monitoring Options - USMT provides several options that you can use to analyze problems that occur during migration. -> [!NOTE] +> [!NOTE] > The ScanState log is created by default, but you can specify the name and location of the log with the **/l** option. - - - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Command-Line OptionDescription

/listfiles:<FileName>

You can use the /listfiles command-line option with the ScanState command to generate a text file that lists all of the files included in the migration.

/l:[Path]FileName

Specifies the location and name of the ScanState log.

-

You cannot store any of the log files in StorePath. Path can be either a relative or full path. If you do not specify the Path variable, then the log will be created in the current directory. You can use the /v option to adjust the amount of output.

-

If you run the ScanState or LoadState commands from a shared network resource, you must specify this option or USMT will fail with the following error: "USMT was unable to create the log file(s)". To fix this issue, use the /l: scan.log command.

/v:<VerbosityLevel>

(Verbosity)

-

Enables verbose output in the ScanState log file. The default value is 0.

-

You can set the VerbosityLevel to one of the following levels:

- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LevelExplanation

0

Only the default errors and warnings are enabled.

1

Enables verbose output.

4

Enables error and status output.

5

Enables verbose and status output.

8

Enables error output to a debugger.

9

Enables verbose output to a debugger.

12

Enables error and status output to a debugger.

13

Enables verbose, status, and debugger output.

-

-

For example:

-

scanstate \server\share\migration\mystore /v:13 /i:migdocs.xml /i:migapp.xml

-

/progress:[Path</em>]FileName

Creates the optional progress log. You cannot store any of the log files in StorePath. Path can be either a relative or full path. If you do not specify the Path variable, then FileName will be created in the current directory.

-

For example:

-

scanstate /i:migapp.xml /i:migdocs.xml \server\share\migration\mystore /progress:prog.log /l:scanlog.log

/c

When this option is specified, the ScanState command will continue to run, even if non-fatal errors occur. Any files or settings that cause an error are logged in the progress log. For example, if there is a large file that will not fit in the store, the ScanState command will log an error and continue with the migration. In addition, if a file is open or in use by an application, USMT may not be able to migrate the file and will log an error. Without the /c option, the ScanState command will exit on the first error.

-

You can use the new <ErrorControl> section in the Config.xml file to specify which file or registry read/write errors can be safely ignored and which might cause the migration to fail. This enables the /c command-line option to safely skip all input/output (I/O) errors in your environment. In addition, the /genconfig option now generates a sample <ErrorControl> section that is enabled by specifying error messages and desired behaviors in the Config.xml file.

/r:<TimesToRetry>

(Retry)

-

Specifies the number of times to retry when an error occurs while saving the user state to a server. The default is three times. This option is useful in environments where network connectivity is not reliable.

-

While storing the user state, the /r option will not be able to recover data that is lost due to a network-hardware failure, such as a faulty or disconnected network cable, or when a virtual private network (VPN) connection fails. The retry option is intended for large, busy networks where connectivity is satisfactory, but communication latency is a problem.

/w:<SecondsBeforeRetry>

(Wait)

-

Specifies the time to wait, in seconds, before retrying a network file operation. The default is 1 second.

/p:<pathToFile>

When the ScanState command runs, it will create an .xml file in the path specified. This .xml file includes improved space estimations for the migration store. The following example shows how to create this .xml file:

-

Scanstate.exe C:\MigrationLocation [additional parameters]

-

/p:"C:\MigrationStoreSize.xml"

-

For more information, see Estimate Migration Store Size.

-

To preserve the functionality of existing applications or scripts that require the previous behavior of USMT, you can use the /p option, without specifying "pathtoafile", in USMT. If you specify only the /p option, the storage space estimations are created in the same manner as with USMT3.x releases.

/? or /help

Displays Help at the command line.

- - +| Command-Line Option | Description | +|-----|-----| +| **/listfiles**:<FileName> | You can use the **/listfiles** command-line option with the **ScanState** command to generate a text file that lists all of the files included in the migration. | +| **/l:**[*Path*]*FileName* | Specifies the location and name of the ScanState log.

You cannot store any of the log files in *StorePath*. *Path* can be either a relative or full path. If you do not specify the *Path* variable, then the log will be created in the current directory. You can use the **/v** option to adjust the amount of output.

If you run the **ScanState** or **LoadState** commands from a shared network resource, you must specify this option or USMT will fail with the following error: "USMT was unable to create the log file(s)". To fix this issue, use the /**l: scan.log** command. | +| **/v:***<VerbosityLevel>* | **(Verbosity)**

Enables verbose output in the ScanState log file. The default value is 0.

You can set the *VerbosityLevel* to one of the following levels:
For example:
`scanstate \server\share\migration\mystore /v:13 /i:migdocs.xml /i:migapp.xml`| +| /**progress**:[*Path*]*FileName* | Creates the optional progress log. You cannot store any of the log files in *StorePath*. *Path* can be either a relative or full path. If you do not specify the *Path* variable, then *FileName* will be created in the current directory.

For example:
`scanstate /i:migapp.xml /i:migdocs.xml \server\share\migration\mystore /progress:prog.log /l:scanlog.log` | +| **/c** | When this option is specified, the **ScanState** command will continue to run, even if non-fatal errors occur. Any files or settings that cause an error are logged in the progress log. For example, if there is a large file that will not fit in the store, the **ScanState** command will log an error and continue with the migration. In addition, if a file is open or in use by an application, USMT may not be able to migrate the file and will log an error. Without the **/c** option, the **ScanState** command will exit on the first error.

You can use the new <**ErrorControl**> section in the Config.xml file to specify which file or registry read/write errors can be safely ignored and which might cause the migration to fail. This enables the /**c** command-line option to safely skip all input/output (I/O) errors in your environment. In addition, the /**genconfig** option now generates a sample <**ErrorControl**> section that is enabled by specifying error messages and desired behaviors in the Config.xml file. | +| **/r:***<TimesToRetry>* | **(Retry)**

Specifies the number of times to retry when an error occurs while saving the user state to a server. The default is three times. This option is useful in environments where network connectivity is not reliable.

While storing the user state, the **/r** option will not be able to recover data that is lost due to a network-hardware failure, such as a faulty or disconnected network cable, or when a virtual private network (VPN) connection fails. The retry option is intended for large, busy networks where connectivity is satisfactory, but communication latency is a problem. | +| **/w:***<SecondsBeforeRetry>* | **(Wait)**

Specifies the time to wait, in seconds, before retrying a network file operation. The default is 1 second. | +| **/p:***<pathToFile>* | When the **ScanState** command runs, it will create an .xml file in the path specified. This .xml file includes improved space estimations for the migration store. The following example shows how to create this .xml file:
`Scanstate.exe C:\MigrationLocation [additional parameters]`
`/p:"C:\MigrationStoreSize.xml"`

For more information, see [Estimate Migration Store Size](usmt-estimate-migration-store-size.md).

To preserve the functionality of existing applications or scripts that require the previous behavior of USMT, you can use the **/p** option, without specifying *"pathtoafile"*, in USMT. If you specify only the **/p** option, the storage space estimations are created in the same manner as with USMT3.x releases. | +| /**?** or /**help** | Displays Help at the command line. | ## User Options - By default, all users are migrated. The only way to specify which users to include and exclude is by using the following options. You cannot exclude users in the migration .xml files or using the Config.xml file. For more information, see [Identify Users](usmt-identify-users.md) and [Migrate User Accounts](usmt-migrate-user-accounts.md). - ---- - - - - - - - - - - - - - - - - - - - - - - - - -
Command-Line OptionDescription

/all

Migrates all of the users on the computer.

-

USMT migrates all user accounts on the computer, unless you specifically exclude an account with either the /ue or /uel options. For this reason, you do not need to specify this option on the command line. However, if you choose to specify the /all option, you cannot also use the /ui, /ue or /uel options.

/ui:<DomainName>\<UserName>

-

or

-

/ui:<ComputerName>\<LocalUserName>

(User include)

-

Migrates the specified users. By default, all users are included in the migration. Therefore, this option is helpful only when used with the /ue or /uel options. You can specify multiple /ui options, but you cannot use the /ui option with the /all option. DomainName and UserName can contain the asterisk () wildcard character. When you specify a user name that contains spaces, you will need to surround it with quotation marks.

-
-Note

If a user is specified for inclusion with the /ui option, and also is specified to be excluded with either the /ue or /uel options, the user will be included in the migration.

-
-
- -
-

For example:

-
    -

    To include only User2 from the Fabrikam domain, type:

    -

    /ue:*\* /ui:fabrikam\user2

    -

    To migrate all users from the Fabrikam domain, and only the user accounts from other domains that have been active or otherwise modified in the last 30 days, type:

    -

    /uel:30 /ui:fabrikam\*

    -

    In this example, a user account from the Contoso domain that was last modified two months ago will not be migrated.

    -
-

For more examples, see the descriptions of the /ue and /ui options in this table.

/uel:<NumberOfDays>

-

or

-

/uel:<YYYY/MM/DD>

-

or

-

/uel:0

(User exclude based on last logon)

-

Migrates the users that logged on to the source computer within the specified time period, based on the Last Modified date of the Ntuser.dat file on the source computer. The /uel option acts as an include rule. For example, the /uel:30 option migrates users who logged on, or whose account was modified, within the last 30 days from the date when the ScanState command is run.

-

You can specify a number of days or you can specify a date. You cannot use this option with the /all option. USMT retrieves the last logon information from the local computer, so the computer does not need to be connected to the network when you run this option. In addition, if a domain user has logged on to another computer, that logon instance is not considered by USMT.

-
-Note

The /uel option is not valid in offline migrations.

-
-
- -
-
    -
  • /uel:0 migrates any users who are currently logged on.

  • -
  • /uel:90 migrates users who have logged on, or whose accounts have been otherwise modified, within the last 90 days.

  • -
  • /uel:1 migrates users whose account has been modified within the last 24 hours.

  • -
  • /uel:2002/1/15 migrates users who have logged on or been modified January 15, 2002 or afterwards.

  • -
-

For example:

-

scanstate /i:migapp.xml /i:migdocs.xml \\server\share\migration\mystore /uel:0

/ue:<DomainName>\<UserName>

-

-or-

-

-

/ue:<ComputerName>\<LocalUserName>

(User exclude)

-

Excludes the specified users from the migration. You can specify multiple /ue options. You cannot use this option with the /all option. <DomainName> and <UserName> can contain the asterisk () wildcard character. When you specify a user name that contains spaces, you need to surround it with quotation marks.

-

For example:

-

scanstate /i:migdocs.xml /i:migapp.xml \\server\share\migration\mystore /ue:contoso\user1

- - +| Command-Line Option | Description | +|-----|-----| +| /**all** | Migrates all of the users on the computer.

USMT migrates all user accounts on the computer, unless you specifically exclude an account with either the /**ue** or /**uel** options. For this reason, you do not need to specify this option on the command line. However, if you choose to specify the /**all** option, you cannot also use the /**ui**, /**ue** or /**uel** options. | +| /**ui**:*<DomainName>*\*<UserName>*
or
/**ui**:*<ComputerName>*\*<LocalUserName>* | **(User include)**

Migrates the specified users. By default, all users are included in the migration. Therefore, this option is helpful only when used with the /**ue** or /**uel** options. You can specify multiple /**ui** options, but you cannot use the /**ui** option with the /**all** option. *DomainName* and *UserName* can contain the asterisk () wildcard character. When you specify a user name that contains spaces, you will need to surround it with quotation marks.
**Note**
If a user is specified for inclusion with the /**ui** option, and also is specified to be excluded with either the /**ue** or /**uel** options, the user will be included in the migration.

For example:
  • To include only User2 from the Fabrikam domain, type:
    `/ue:*\* /ui:fabrikam\user2`
  • To migrate all users from the Fabrikam domain, and only the user accounts from other domains that have been active or otherwise modified in the last 30 days, type:
    `/uel:30 /ui:fabrikam\*`
    In this example, a user account from the Contoso domain that was last modified two months ago will not be migrated.

For more examples, see the descriptions of the /**ue** and /**ui** options in this table. | +| /**uel**:*<NumberOfDays>*
or
/**uel**:*<YYYY/MM/DD>*
or
**/uel:0** | **(User exclude based on last logon)**

Migrates the users that logged on to the source computer within the specified time period, based on the **Last Modified** date of the Ntuser.dat file on the source computer. The /**uel** option acts as an include rule. For example, the **/uel:30** option migrates users who logged on, or whose account was modified, within the last 30 days from the date when the ScanState command is run.

You can specify a number of days or you can specify a date. You cannot use this option with the /**all** option. USMT retrieves the last logon information from the local computer, so the computer does not need to be connected to the network when you run this option. In addition, if a domain user has logged on to another computer, that logon instance is not considered by USMT.
**Note**
The /**uel** option is not valid in offline migrations.
  • **/uel:0** migrates any users who are currently logged on.
  • **/uel:90** migrates users who have logged on, or whose accounts have been otherwise modified, within the last 90 days.
  • **/uel:1** migrates users whose account has been modified within the last 24 hours.
  • **/uel:2002/1/15** migrates users who have logged on or been modified January 15, 2002 or afterwards.

For example:
`scanstate /i:migapp.xml /i:migdocs.xml \\server\share\migration\mystore /uel:0` | +| /**ue**:*<DomainName>*\*<UserName>*
-or-

/**ue**:*<ComputerName>*\*<LocalUserName>* | **(User exclude)**

Excludes the specified users from the migration. You can specify multiple /**ue** options. You cannot use this option with the /**all** option. *<DomainName>* and *<UserName>* can contain the asterisk (
) wildcard character. When you specify a user name that contains spaces, you need to surround it with quotation marks.

For example:
`scanstate /i:migdocs.xml /i:migapp.xml \\server\share\migration\mystore /ue:contoso\user1` | ## How to Use /ui and /ue - The following examples apply to both the /**ui** and /**ue** options. You can replace the /**ue** option with the /**ui** option to include, rather than exclude, the specified users. - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
BehaviorCommand

Exclude the user named User One in the Fabrikam domain.

/ue:"fabrikam\user one"

Exclude the user named User1 in the Fabrikam domain.

/ue:fabrikam\user1

Exclude the local user named User1.

/ue:%computername%\user1

Exclude all domain users.

/ue:Domain\*

Exclude all local users.

/ue:%computername%\*

Exclude users in all domains named User1, User2, and so on.

/ue:*\user*

- - +|Behavior|Command| +|--- |--- | +|Exclude the user named User One in the Fabrikam domain.|`/ue:"fabrikam\user one"`| +|Exclude the user named User1 in the Fabrikam domain.|`/ue:fabrikam\user1`| +|Exclude the local user named User1.|`/ue:%computername%\user1`| +|Exclude all domain users.|`/ue:Domain\*`| +|Exclude all local users.|`/ue:%computername%\*`| +|Exclude users in all domains named User1, User2, and so on.|`/ue:*\user*`| ## Using the Options Together - You can use the /**uel**, /**ue** and /**ui** options together to migrate only the users that you want migrated. The /**ui** option has precedence over the /**ue** and /**uel** options. If a user is specified to be included using the /**ui** option, and also specified to be excluded using either the /**ue** or /**uel** options, the user will be included in the migration. For example, if you specify `/ui:contoso\* /ue:contoso\user1`, then User1 will be migrated, because the /**ui** option takes precedence over the /**ue** option. The /**uel** option takes precedence over the /**ue** option. If a user has logged on within the specified time period set by the /**uel** option, that user’s profile will be migrated even if they are excluded by using the /**ue** option. For example, if you specify `/ue:fixed\user1 /uel:14`, the User1 will be migrated if they have logged on to the computer within the last 14 days. - ---- - - - - - - - - - - - - - - - - - - - - - - - - -
BehaviorCommand

Include only User2 from the Fabrikam domain and exclude all other users.

/ue:*\* /ui:fabrikam\user2

Include only the local user named User1 and exclude all other users.

/ue:*\* /ui:user1

Include only the domain users from Contoso, except Contoso\User1.

This behavior cannot be completed using a single command. Instead, to migrate this set of users, you will need to specify the following:

-
    -
  • On the ScanState command line, type: /ue:*\* /ui:contoso\*

  • -
  • On the LoadState command line, type: /ue:contoso\user1

  • -

Include only local (non-domain) users.

/ue:*\* /ui:%computername%\*

- - +|Behavior|Command| +|--- |--- | +|Include only User2 from the Fabrikam domain and exclude all other users.|`/ue:*\* /ui:fabrikam\user2`| +|Include only the local user named User1 and exclude all other users.|`/ue:*\* /ui:user1`| +|Include only the domain users from Contoso, except Contoso\User1.|This behavior cannot be completed using a single command. Instead, to migrate this set of users, you will need to specify the following: | +|Include only local (non-domain) users.|`/ue:*\* /ui:%computername%\*`| ## Encrypted File Options - You can use the following options to migrate encrypted files. In all cases, by default, USMT fails if an encrypted file is found unless you specify an /**efs** option. To migrate encrypted files, you must change the default behavior. For more information, see [Migrate EFS Files and Certificates](usmt-migrate-efs-files-and-certificates.md). @@ -618,245 +196,49 @@ For more information, see [Migrate EFS Files and Certificates](usmt-migrate-efs- > [!NOTE] > EFS certificates will be migrated automatically when migrating to Windows 7, Windows 8 or Windows 10. Therefore, you should specify the /**efs:copyraw** option with the **ScanState** command to migrate the encrypted files - > [!CAUTION] > Take caution when migrating encrypted files. If you migrate an encrypted file without also migrating the certificate, end users will not be able to access the file after the migration. - - - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Command-Line OptionExplanation

/efs:hardlink

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

/efs:abort

Causes the ScanState command to fail with an error code, if an Encrypting File System (EFS) file is found on the source computer. Enabled by default.

/efs:skip

Causes the ScanState command to ignore EFS files.

/efs:decryptcopy

Causes the ScanState command to decrypt the file, if possible, before saving it to the migration store, and to fail if the file cannot be decrypted. If the ScanState command succeeds, the file will be unencrypted in the migration store, and once you run the LoadState command, the file will be copied to the destination computer.

/efs:copyraw

Causes the ScanState command to copy the files in the encrypted format. The files will be inaccessible on the destination computer until the EFS certificates are migrated. EFS certificates will be automatically migrated; however, by default USMT fails if an encrypted file is found, unless you specify an /efs option. Therefore you should specify the /efs:copyraw option with the ScanState command to migrate the encrypted file. Then, when you run the LoadState command, the encrypted file and the EFS certificate will be automatically migrated.

-

For example:

-

ScanState /i:migdocs.xml /i:migapp.xml \server\share\migration\mystore /efs:copyraw

-
-Important

All files must be encrypted if the parent folder is encrypted. If the encryption attribute on a file inside an encrypted folder has been removed, the file will be encrypted during the migration using the credentials of the account used to run the LoadState tool. For more information, see Migrate EFS Files and Certificates.

-
-
- -
- - +| Command-Line Option | Explanation | +|----|----| +| **/efs:hardlink** | Creates a hard link to the EFS file instead of copying it. Use only with the **/hardlink** and the **/nocompress** options. | +| **/efs:abort** | Causes the **ScanState** command to fail with an error code, if an Encrypting File System (EFS) file is found on the source computer. Enabled by default. | +| **/efs:skip** | Causes the **ScanState** command to ignore EFS files. | +| /**efs:decryptcopy** | Causes the **ScanState** command to decrypt the file, if possible, before saving it to the migration store, and to fail if the file cannot be decrypted. If the **ScanState** command succeeds, the file will be unencrypted in the migration store, and once you run the **LoadState** command, the file will be copied to the destination computer. | +| **/efs:copyraw** | Causes the **ScanState** command to copy the files in the encrypted format. The files will be inaccessible on the destination computer until the EFS certificates are migrated. EFS certificates will be automatically migrated; however, by default USMT fails if an encrypted file is found, unless you specify an **/efs** option. Therefore you should specify the **/efs:copyraw** option with the **ScanState** command to migrate the encrypted file. Then, when you run the **LoadState** command, the encrypted file and the EFS certificate will be automatically migrated.

For example:
`ScanState /i:migdocs.xml /i:migapp.xml \server\share\migration\mystore /efs:copyraw`
**Important**
All files must be encrypted if the parent folder is encrypted. If the encryption attribute on a file inside an encrypted folder has been removed, the file will be encrypted during the migration using the credentials of the account used to run the LoadState tool. For more information, see [Migrate EFS Files and Certificates](usmt-migrate-efs-files-and-certificates.md).
| ## Incompatible Command-Line Options - The following table indicates which command-line options are not compatible with the **ScanState** command. If the table entry for a particular combination is blank, the options are compatible and you can use them together. The X symbol means that the options are not compatible. For example, you cannot use the **/nocompress** option with the **/encrypt** option. - ------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Command-Line Option/keyfile/nocompress/genconfig/all

/i

/o

/v

/nocompress

N/A

/localonly

X

/key

X

X

/encrypt

Required*

X

X

/keyfile

N/A

X

/l

/progress

X

/r

X

/w

X

/c

X

/p

X

N/A

/all

X

/ui

X

X

/ue

X

X

/uel

X

X

/efs:<option>

X

/genconfig

N/A

/config

X

<StorePath>

X

- +|Command-Line Option|/keyfile|/nocompress|/genconfig|/all| +|--- |--- |--- |--- |--- | +|**/i**||||| +|**/o**||||| +|**/v**||||| +|/**nocompress**||||N/A| +|/**localonly**|||X|| +|/**key**|X||X|| +|/**encrypt**|Required*|X|X|| +|/**keyfile**|N/A||X|| +|/**l**||||| +|/**progress**|||X|| +|/**r**|||X|| +|/**w**|||X|| +|/**c**|||X|| +|/**p**|||X|N/A| +|/**all**|||X|| +|/**ui**|||X|X| +|/**ue**|||X|X| +|/**uel**|||X|X| +|/**efs**:*<option>*|||X|| +|/**genconfig**|||N/A|| +|/**config**|||X|| +|*<StorePath>*|||X|| > [!NOTE] > You must specify either the /**key** or /**keyfile** option with the /**encrypt** option. - - ## Related topics - [XML Elements Library](usmt-xml-elements-library.md) - diff --git a/windows/deployment/usmt/usmt-troubleshooting.md b/windows/deployment/usmt/usmt-troubleshooting.md index 1a2fbc4401..7a4bedbd54 100644 --- a/windows/deployment/usmt/usmt-troubleshooting.md +++ b/windows/deployment/usmt/usmt-troubleshooting.md @@ -16,46 +16,20 @@ ms.topic: article # User State Migration Tool (USMT) Troubleshooting - The following table describes topics that address common User State Migration Tool (USMT) 10.0 issues and questions. These topics describe tools that you can use to troubleshoot issues that arise during your migration. ## In This Section - - ---- - - - - - - - - - - - - - - - - - - - - - - -

Common Issues

Find troubleshooting solutions for common problems in USMT.

Frequently Asked Questions

Find answers to questions about how to use USMT.

Log Files

Learn how to enable logging to help you troubleshoot issues in USMT.

Return Codes

Learn how to use return codes to identify problems in USMT.

USMT Resources

Find more information and support for using USMT.

- - +| Link | Description | +|--- |--- | +|[Common Issues](usmt-common-issues.md)|Find troubleshooting solutions for common problems in USMT.| +|[Frequently Asked Questions](usmt-faq.yml)|Find answers to questions about how to use USMT.| +|[Log Files](usmt-log-files.md)|Learn how to enable logging to help you troubleshoot issues in USMT.| +|[Return Codes](usmt-return-codes.md)|Learn how to use return codes to identify problems in USMT.| +|[USMT Resources](usmt-resources.md)|Find more information and support for using USMT.| ## Related topics - [USMT Best Practices](usmt-best-practices.md) [User State Migration Tool (USMT) Overview Topics](usmt-topics.md) @@ -63,12 +37,3 @@ The following table describes topics that address common User State Migration To [User State Migration Tool (USMT) How-to topics](usmt-how-to.md) [User State Migration Toolkit (USMT) Reference](usmt-reference.md) - - - - - - - - - diff --git a/windows/deployment/usmt/usmt-utilities.md b/windows/deployment/usmt/usmt-utilities.md index d87666c8b6..0824d0f77f 100644 --- a/windows/deployment/usmt/usmt-utilities.md +++ b/windows/deployment/usmt/usmt-utilities.md @@ -16,7 +16,6 @@ ms.topic: article # UsmtUtils Syntax - This topic describes the syntax for the utilities available in User State Migration Tool (USMT) 10.0 through the command-line interface. These utilities: - Improve your ability to determine cryptographic options for your migration. @@ -29,7 +28,6 @@ This topic describes the syntax for the utilities available in User State Migrat ## In This Topic - [Usmtutils.exe](#bkmk-usmtutils-exe) [Verify Options](#bkmk-verifyoptions) @@ -38,162 +36,34 @@ This topic describes the syntax for the utilities available in User State Migrat ## Usmtutils.exe - The following table lists command-line options for USMTutils.exe. The sections that follow provide further command-line options for the **/verify** and the **/extract** options. The syntax for UsmtUtils.exe is: usmtutils \[/ec | /rd *<storeDir>* | /verify *<filepath>* \[options\] | /extract *<filepath>* *<destinationPath>* \[options\]\] - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Command-line OptionDescription

/ec

Returns a list of supported cryptographic algorithms (AlgIDs) on the current system. You can use this on a destination computer to determine which algorithm to use with the /encrypt command before you run the ScanState tool on the source computer.

/rd<storeDir>

Removes the directory path specified by the <storeDir> argument on the computer. You can use this command to delete hard-link migration stores that cannot otherwise be deleted at a command prompt due to a sharing lock. If the migration store spans multiple volumes on a given drive, it will be deleted from all of these volumes.

-

For example:

-

usmtutils /rd D:\MyHardLinkStore

/y

Overrides the accept deletions prompt when used with the /rd option. When you use the /y option with the /rd option, you will not be prompted to accept the deletions before USMT deletes the directories.

/verify

Returns information on whether the compressed migration store is intact or whether it contains corrupted files or a corrupted catalog.

-

See Verify Options for syntax and options to use with /verify.

/extract

Recovers files from a compressed USMT migration store.

-

See Extract Options for syntax and options to use with /extract.

- - +|Command-line Option|Description| +|--- |--- | +|**/ec**|Returns a list of supported cryptographic algorithms (AlgIDs) on the current system. You can use this on a destination computer to determine which algorithm to use with the **/encrypt** command before you run the ScanState tool on the source computer.| +|**/rd** *<storeDir>* |Removes the directory path specified by the *<storeDir>* argument on the computer. You can use this command to delete hard-link migration stores that cannot otherwise be deleted at a command prompt due to a sharing lock. If the migration store spans multiple volumes on a given drive, it will be deleted from all of these volumes.

For example:
`usmtutils /rd D:\MyHardLinkStore`| +|**/y**|Overrides the accept deletions prompt when used with the **/rd** option. When you use the **/y** option with the **/rd** option, you will not be prompted to accept the deletions before USMT deletes the directories.| +|**/verify**|Returns information on whether the compressed migration store is intact or whether it contains corrupted files or a corrupted catalog.

See [Verify Options](#bkmk-verifyoptions) for syntax and options to use with **/verify**.| +|**/extract**|Recovers files from a compressed USMT migration store.

See [Extract Options](#bkmk-extractoptions) for syntax and options to use with **/extract**.| ## Verify Options - Use the **/verify** option when you want to determine whether a compressed migration store is intact or whether it contains corrupted files or a corrupted catalog. For more information on how to use the **/verify** option, see [Verify the Condition of a Compressed Migration Store](verify-the-condition-of-a-compressed-migration-store.md). The syntax for **/verify** is: usmtutils /verify\[:*<reportType>*\] *<filePath>* \[/l:*<logfile>*\] \[/v:*VerbosityLevel*\] \[/decrypt \[:*<AlgID>*\] {/key:*<keystring>* | /keyfile:*<filename>*}\] - ---- - - - - - - - - - - - - - - - - - - - - - - - - -
Command-line OptionDescription

<reportType>

Specifies whether to report on all files, corrupted files only, or the status of the catalog.

-
    -
  • Summary. Returns both the number of files that are intact and the number of files that are corrupted in the migration store. If no algorithm is specified, the summary report is displayed as a default.

  • -
  • all. Returns a tab-delimited list of all of the files in the compressed migration store and the status for each file. Each line contains the file name followed by a tab spacing, and either “CORRUPTED” or “OK” depending on the status of the file. The last entry reports the corruption status of the "CATALOG" of the store. A catalog file contains metadata for all files in a migration store. The LoadState tool requires a valid catalog file in order to open the migration store. Returns "OK" if the catalog file is intact and LoadState can open the migration store and "CORRUPTED" if the migration store is corrupted.

  • -
  • failureonly. Returns a tab-delimited list of only the files that are corrupted in the compressed migration store.

  • -
  • Catalog. Returns only the status of the catalog file.

  • -
/l: -

<logfilePath>

Specifies the location and name of the log file.

/v:<VerbosityLevel>

(Verbosity)

-

Enables verbose output in the UsmtUtils log file. The default value is 0.

-

You can set the VerbosityLevel to one of the following levels:

- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LevelExplanation

0

Only the default errors and warnings are enabled.

1

Enables verbose output.

4

Enables error and status output.

5

Enables verbose and status output.

8

Enables error output to a debugger.

9

Enables verbose output to a debugger.

12

Enables error and status output to a debugger.

13

Enables verbose, status, and debugger output.

-

 

/decrypt<AlgID>/:<KeyString>

-

or

-

/decrypt<AlgID>/:<“Key String”>

-

or

-

/decrypt:<AlgID>/keyfile:<FileName>

Specifies that the /encrypt option was used to create the migration store with the ScanState tool. To decrypt the migration store, specify a /key or /keyfile option as follows:

-
    -
  • <AlgID> specifies the cryptographic algorithm that was used to create the migration store on the ScanState command line. If no algorithm is specified, ScanState and UsmtUtils use the 3DES algorithm as a default.

    -

    <AlgID> valid values include: AES_128, AES_192, AES_256, 3DES, or 3DES_112.

  • -
  • /key:<KeyString> specifies the encryption key. If there is a space in <KeyString>, you must surround the argument with quotation marks.

  • -
  • /keyfile: <FileName> specifies the location and name of a text (.txt) file that contains the encryption key.

  • -
-

For more information about supported encryption algorithms, see Migration Store Encryption

- - +| Command-line Option | Description | +|-----|--------| +| *<reportType>* | Specifies whether to report on all files, corrupted files only, or the status of the catalog. | +| **/l:**
*<logfilePath>* | Specifies the location and name of the log file. | +| **/v:** *<VerbosityLevel>* | **(Verbosity)**

Enables verbose output in the UsmtUtils log file. The default value is 0.

You can set the *VerbosityLevel* to one of the following levels:
| +| **/decrypt** *<AlgID>* **/**:*<KeyString>*
or
**/decrypt** *<AlgID>* **/**:*<“Key String”>*
or
**/decrypt:** *<AlgID>* **/keyfile**:*<FileName>* | Specifies that the **/encrypt** option was used to create the migration store with the ScanState tool. To decrypt the migration store, specify a **/key** or **/keyfile** option as follows:

For more information about supported encryption algorithms, see [Migration Store Encryption](usmt-migration-store-encryption.md) | Some examples of **/verify** commands: @@ -214,116 +84,16 @@ The syntax for **/extract** is: /extract *<filePath>* *<destinationPath>* \[/i:*<includePattern>*\] \[/e: *<excludePattern>*\] \[/l: *<logfile>*\] \[/v: *VerbosityLevel>*\] \[/decrypt\[:*<AlgID>*\] {key: *<keystring>* | /keyfile: *<filename>*}\] \[/o\] - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Command-line OptionDescription

<filePath>

Path to the USMT migration store.

-

For example:

-

D:\MyMigrationStore\USMT\store.mig

<destinationPath>

Path to the folder where the tool puts the individual files.

/i:<includePattern>

Specifies a pattern for files to include in the extraction. You can specify more than one pattern. Separate patterns with a comma or a semicolon. You can use /i: <includePattern> and /e: <excludePattern> options in the same command. When both include and exclude patterns are used on the command line, include patterns take precedence over exclude patterns.

/e:<excludePattern>

Specifies a pattern for files to omit from the extraction. You can specify more than one pattern. Separate patterns with a comma or a semicolon. You can use /i: <includePattern> and /e: <excludePattern> options in the same command. When both include and exclude patterns are used on the command line, include patterns take precedence over exclude patterns.

/l:<logfilePath>

Specifies the location and name of the log file.

/v:<VerbosityLevel>

(Verbosity)

-

Enables verbose output in the UsmtUtils log file. The default value is 0.

-

You can set the VerbosityLevel to one of the following levels:

- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LevelExplanation

0

Only the default errors and warnings are enabled.

1

Enables verbose output.

4

Enables error and status output.

5

Enables verbose and status output.

8

Enables error output to a debugger.

9

Enables verbose output to a debugger.

12

Enables error and status output to a debugger.

13

Enables verbose, status, and debugger output.

-

 

/decrypt<AlgID>/key:<KeyString>

-

or

-

/decrypt<AlgID>/:<“Key String”>

-

or

-

/decrypt:<AlgID>/keyfile:<FileName>

Specifies that the /encrypt option was used to create the migration store with the ScanState tool. To decrypt the migration store, you must also specify a /key or /keyfile option as follows:

-
    -
  • <AlgID> specifies the cryptographic algorithm that was used to create the migration store on the ScanState command line. If no algorithm is specified, ScanState and UsmtUtils use the 3DES algorithm as a default.

    -

    <AlgID> valid values include: AES_128, AES_192, AES_256, 3DES, or 3DES_112.

  • -
  • /key: <KeyString> specifies the encryption key. If there is a space in <KeyString>, you must surround the argument with quotation marks.

  • -
  • /keyfile:<FileName> specifies a text (.txt) file that contains the encryption key

  • -
-

For more information about supported encryption algorithms, see Migration Store Encryption.

/o

Overwrites existing output files.

- - +| Command-line Option | Description | +|-------|-----| +| *<filePath>* | Path to the USMT migration store.

For example:
`D:\MyMigrationStore\USMT\store.mig` | +| *<destinationPath>* | Path to the folder where the tool puts the individual files. | +| **/i**:*<includePattern>* | Specifies a pattern for files to include in the extraction. You can specify more than one pattern. Separate patterns with a comma or a semicolon. You can use **/i**: *<includePattern>* and **/e**: *<excludePattern>* options in the same command. When both include and exclude patterns are used on the command line, include patterns take precedence over exclude patterns. | +| **/e**:*<excludePattern>* | Specifies a pattern for files to omit from the extraction. You can specify more than one pattern. Separate patterns with a comma or a semicolon. You can use **/i**: *<includePattern>* and **/e**: *<excludePattern>* options in the same command. When both include and exclude patterns are used on the command line, include patterns take precedence over exclude patterns. | +| **/l**:*<logfilePath>* | Specifies the location and name of the log file. | +| **/v:***<VerbosityLevel>* | **(Verbosity)**

Enables verbose output in the UsmtUtils log file. The default value is 0.

You can set the *VerbosityLevel* to one of the following levels:
| +| **/decrypt***<AlgID>***/key**:*<KeyString>*
or
**/decrypt***<AlgID>***/**:*<“Key String”>*
or
**/decrypt:***<AlgID>***/keyfile**:*<FileName>* | Specifies that the **/encrypt** option was used to create the migration store with the ScanState tool. To decrypt the migration store, you must also specify a **/key** or **/keyfile** option as follows:

For more information about supported encryption algorithms, see [Migration Store Encryption](usmt-migration-store-encryption.md). | +| **/o** | Overwrites existing output files. | Some examples of **/extract** commands: @@ -337,16 +107,6 @@ Some examples of **/extract** commands: ## Related topics - [User State Migration Tool (USMT) Command-line Syntax](usmt-command-line-syntax.md) [Return Codes](usmt-return-codes.md) - - - - - - - - - diff --git a/windows/deployment/usmt/usmt-what-does-usmt-migrate.md b/windows/deployment/usmt/usmt-what-does-usmt-migrate.md index c9c2d3cd28..c8660b4b6d 100644 --- a/windows/deployment/usmt/usmt-what-does-usmt-migrate.md +++ b/windows/deployment/usmt/usmt-what-does-usmt-migrate.md @@ -16,10 +16,8 @@ ms.topic: article # What does USMT migrate? - ## In this topic - - [Default migration scripts](#bkmk-defaultmigscripts) - [User Data](#bkmk-3) @@ -32,7 +30,6 @@ ms.topic: article ## Default migration scripts - The User State Migration Tool (USMT) 10.0 is designed so that an IT engineer can precisely define migrations using the USMT .xml scripting language. USMT provides the following sample scripts: - **MigApp.XML.** Rules to migrate application settings. @@ -41,25 +38,23 @@ The User State Migration Tool (USMT) 10.0 is designed so that an IT engineer ca - **MigUser.XML.** Rules to migrate user profiles and user data. - MigUser.xml gathers everything in a user’s profile and then does a file extension- based search of most of the system for other user data. If data doesn’t match either of these criteria, the data won’t be migrated. For the most part, this file describes a "core" migration. + MigUser.xml gathers everything in a user’s profile and then does a file extension- based search of most of the system for other user data. If data doesn’t match either of these criteria, the data won’t be migrated. For the most part, this file describes a "core" migration. - The following data does not migrate with MigUser.xml: + The following data does not migrate with MigUser.xml: - - Files outside the user profile that don’t match one of the file extensions in MigUser.xml. - - - Access control lists (ACLs) for folders outside the user profile. + - Files outside the user profile that don’t match one of the file extensions in MigUser.xml. + - Access control lists (ACLs) for folders outside the user profile. ## User data - This section describes the user data that USMT migrates by default, using the MigUser.xml file. It also defines how to migrate ACLs. - **Folders from each user profile.** When you specify the MigUser.xml file, USMT migrates everything in a user’s profiles including the following: - My Documents, My Video, My Music, My Pictures, desktop files, Start menu, Quick Launch settings, and Favorites. + My Documents, My Video, My Music, My Pictures, desktop files, Start menu, Quick Launch settings, and Favorites. - >[!IMPORTANT] - >Starting in Windows 10, version 1607 the USMT does not migrate the Start menu layout. To migrate a user's Start menu, you must export and then import settings using the Windows PowerShell cmdlets **Export-StartLayout** and **Import-StartLayout**. For more information, see [USMT common issues](./usmt-common-issues.md#usmt-does-not-migrate-the-start-layout). + > [!IMPORTANT] + > Starting in Windows 10, version 1607 the USMT does not migrate the Start menu layout. To migrate a user's Start menu, you must export and then import settings using the Windows PowerShell cmdlets **Export-StartLayout** and **Import-StartLayout**. For more information, see [USMT common issues](./usmt-common-issues.md#usmt-does-not-migrate-the-start-layout). - **Folders from the All Users and Public profiles.** When you specify the MigUser.xml file, USMT also migrates the following from the **All Users** profile in Windows® XP, or the **Public** profile in Windows Vista, Windows 7, or Windows 8: @@ -77,25 +72,20 @@ This section describes the user data that USMT migrates by default, using the Mi - Shared Favorites -- **File types.** When you specify the MigUser.xml file, the ScanState tool searches the fixed drives, collects and then migrates files with any of the following file extensions: +- **File types.** When you specify the MigUser.xml file, the ScanState tool searches the fixed drives, collects, and then migrates files with any of the following file extensions: - **.accdb, .ch3, .csv, .dif, .doc\*, .dot\*, .dqy, .iqy, .mcw, .mdb\*, .mpp, .one\*, .oqy, .or6, .pot\*, .ppa, .pps\*, .ppt\*, .pre, .pst, .pub, .qdf, .qel, .qph, .qsd, .rqy, .rtf, .scd, .sh3, .slk, .txt, .vl\*, .vsd, .wk\*, .wpd, .wps, .wq1, .wri, .xl\*, .xla, .xlb, .xls\*.** + **.accdb, .ch3, .csv, .dif, .doc\*, .dot\*, .dqy, .iqy, .mcw, .mdb\*, .mpp, .one\*, .oqy, .or6, .pot\*, .ppa, .pps\*, .ppt\*, .pre, .pst, .pub, .qdf, .qel, .qph, .qsd, .rqy, .rtf, .scd, .sh3, .slk, .txt, .vl\*, .vsd, .wk\*, .wpd, .wps, .wq1, .wri, .xl\*, .xla, .xlb, .xls\*.** - **Note**   - The asterisk (\*) stands for zero or more characters. - - + > [!NOTE] + > The asterisk (\*) stands for zero or more characters. - **Access control lists.** USMT migrates ACLs for specified files and folders from computers running both Windows® XP and Windows Vista. For example, if you migrate a file named File1.txt that is read-only for User1 and read/write for User2, these settings will still apply on the destination computer after the migration. -**Important**   -To migrate ACLs, you must specify the directory to migrate in the MigUser.xml file. Using file patterns like \*.doc will not migrate a directory. The source ACL information is migrated only when you explicitly specify the directory. For example, `c:\test docs`. - - +> [!IMPORTANT] +> To migrate ACLs, you must specify the directory to migrate in the MigUser.xml file. Using file patterns like \*.doc will not migrate a directory. The source ACL information is migrated only when you explicitly specify the directory. For example, `c:\test docs`. ## Operating-system components - USMT migrates operating-system components to a destination computer from computers running Windows 7 and Windows 8 The following components are migrated by default using the manifest files: @@ -150,229 +140,72 @@ The following components are migrated by default using the manifest files: \* These settings are not available for an offline migration. For more information, see [Offline Migration Reference](offline-migration-reference.md). -**Important**   -This list may not be complete. There may be additional components that are migrated. +> [!IMPORTANT] +> This list may not be complete. There may be additional components that are migrated. - - -**Note**   -Some settings, such as fonts, are not applied by the LoadState tool until after the destination computer has been restarted. For this reason, restart the destination computer after you run the LoadState tool. - - +> [!NOTE] +> Some settings, such as fonts, are not applied by the LoadState tool until after the destination computer has been restarted. For this reason, restart the destination computer after you run the LoadState tool. ## Supported applications - Although it is not required for all applications, it is good practice to install all applications on the destination computer before restoring the user state. Installing applications before migrating settings helps to ensure that the migrated settings are not overwritten by the application installers. -**Note**   -The versions of installed applications must match on the source and destination computers. USMT does not support migrating the settings of an earlier version of an application to a later version, except for Microsoft Office. - - - -**Note**   -USMT migrates only the settings that have been used or modified by the user. If there is an application setting on the source computer that was not touched by the user, the setting may not migrate. - - +> [!NOTE] +> +> - The versions of installed applications must match on the source and destination computers. USMT does not support migrating the settings of an earlier version of an application to a later version, except for Microsoft Office. +> - USMT migrates only the settings that have been used or modified by the user. If there is an application setting on the source computer that was not touched by the user, the setting may not migrate. When you specify the MigApp.xml file, USMT migrates the settings for the following applications: - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ProductVersion

Adobe Acrobat Reader

9

AOL Instant Messenger

6.8

Adobe Creative Suite

2

Adobe Photoshop CS

8, 9

Adobe ImageReady CS

Apple iTunes

6, 7, 8

Apple QuickTime Player

5, 6, 7

Apple Safari

3.1.2

Google Chrome

beta

Google Picasa

3

Google Talk

beta

IBM Lotus 1-2-3

9

IBM Lotus Notes

6,7, 8

IBM Lotus Organizer

5

IBM Lotus WordPro

9.9

Intuit Quicken Deluxe

2009

Money Plus Business

2008

Money Plus Home

2008

Mozilla Firefox

3

Microsoft Office

2003, 2007, 2010

Microsoft Office Access®

2003, 2007, 2010

Microsoft Office Excel®

2003, 2007, 2010

Microsoft Office FrontPage®

2003, 2007, 2010

Microsoft Office OneNote®

2003, 2007, 2010

Microsoft Office Outlook®

2003, 2007, 2010

Microsoft Office PowerPoint®

2003, 2007, 2010

Microsoft Office Publisher

2003, 2007, 2010

Microsoft Office Word

2003, 2007, 2010

Opera Software Opera

9.5

Microsoft Outlook Express

(only mailbox file)

Microsoft Project

2003, 2007

Microsoft Office Visio®

2003, 2007

RealPlayer Basic

11

Sage Peachtree

2009

Skype

3.8

Windows Live Mail

12, 14

Windows Live Messenger

8.5, 14

Windows Live MovieMaker

14

Windows Live Photo Gallery

12, 14

Windows Live Writer

12, 14

Windows Mail

(Windows 7 and 8)

Microsoft Works

9

Yahoo Messenger

9

Microsoft Zune™ Software

3

- - +|Product|Version| +|--- |--- | +|Adobe Acrobat Reader|9| +|AOL Instant Messenger|6.8| +|Adobe Creative Suite|2| +|Adobe Photoshop CS|8, 9| +|Adobe ImageReady CS|| +|Apple iTunes|6, 7, 8| +|Apple QuickTime Player|5, 6, 7| +|Apple Safari|3.1.2| +|Google Chrome|beta| +|Google Picasa|3| +|Google Talk|beta| +|IBM Lotus 1-2-3|9| +|IBM Lotus Notes|6,7, 8| +|IBM Lotus Organizer|5| +|IBM Lotus WordPro|9.9| +|Intuit Quicken Deluxe|2009| +|Money Plus Business|2008| +|Money Plus Home|2008| +|Mozilla Firefox|3| +|Microsoft Office|2003, 2007, 2010| +|Microsoft Office Access®|2003, 2007, 2010| +|Microsoft Office Excel®|2003, 2007, 2010| +|Microsoft Office FrontPage®|2003, 2007, 2010| +|Microsoft Office OneNote®|2003, 2007, 2010| +|Microsoft Office Outlook®|2003, 2007, 2010| +|Microsoft Office PowerPoint®|2003, 2007, 2010| +|Microsoft Office Publisher|2003, 2007, 2010| +|Microsoft Office Word|2003, 2007, 2010| +|Opera Software Opera|9.5| +|Microsoft Outlook Express|(only mailbox file)| +|Microsoft Project|2003, 2007| +|Microsoft Office Visio®|2003, 2007| +|RealPlayer Basic|11| +|Sage Peachtree|2009| +|Skype|3.8| +|Windows Live Mail|12, 14| +|Windows Live Messenger|8.5, 14| +|Windows Live MovieMaker|14| +|Windows Live Photo Gallery|12, 14| +|Windows Live Writer|12, 14| +|Windows Mail|(Windows 7 and 8)| +|Microsoft Works|9| +|Yahoo Messenger|9| +|Microsoft Zune™ Software|3| ## What USMT does not migrate - The following is a list of the settings that USMT does not migrate. If you are having a problem that is not listed here, see [Common Issues](usmt-common-issues.md). ### Application settings @@ -417,8 +250,4 @@ Starting in Windows 10, version 1607 the USMT does not migrate the Start menu la ## Related topics - [Plan your migration](usmt-plan-your-migration.md) - - - diff --git a/windows/deployment/usmt/usmt-xml-elements-library.md b/windows/deployment/usmt/usmt-xml-elements-library.md index c97dfbadb0..7077db2d80 100644 --- a/windows/deployment/usmt/usmt-xml-elements-library.md +++ b/windows/deployment/usmt/usmt-xml-elements-library.md @@ -16,13 +16,10 @@ ms.topic: article # XML Elements Library - - -This topic describes the XML elements and helper functions that you can employ to author migration .xml files to use with User State Migration Tool (USMT). It is assumed that you understand the basics of XML. . +This topic describes the XML elements and helper functions that you can employ to author migration .xml files to use with User State Migration Tool (USMT). It is assumed that you understand the basics of XML. ## In this topic - In addition to XML elements and helper functions, this topic describes how to specify encoded locations and locations patterns, functions that are for internal USMT use only, and the version tags that you can use with helper functions. - [Elements and helper functions](#elements) @@ -37,88 +34,14 @@ In addition to XML elements and helper functions, this topic describes how to sp ## Elements and Helper Functions - The following table describes the XML elements and helper functions you can use with USMT. - ----- - - - - - - - - - - - - - - -
Elements A-KElements L-ZHelper functions

<addObjects>

-

<attributes>

-

<bytes>

-

<commandLine>

-

<component>

-

<condition>

-

<conditions>

-

<content>

-

<contentModify>

-

<description>

-

<destinationCleanup>

-

<detect>

-

<detects>

-

<detection>

-

<displayName>

-

<environment>

-

<exclude>

-

<excludeAttributes>

-

<extensions>

-

<extension>

-

<externalProcess>

-

<icon>

-

<include>

-

<includeAttribute>

<library>

-

<location>

-

<locationModify>

-

<_locDefinition>

-

<manufacturer>

-

<merge>

-

<migration>

-

<namedElements>

-

<object>

-

<objectSet>

-

<path>

-

<paths>

-

<pattern>

-

<processing>

-

<plugin>

-

<role>

-

<rules>

-

<script>

-

<text>

-

<unconditionalExclude>

-

<variable>

-

<version>

-

<windowsObjects>

<condition> functions

-

<content> functions

-

<contentModify> functions

-

<include> and <exclude> filter functions

-

<locationModify> functions

-

<merge> functions

-

<script> functions

-

Internal USMT functions

- - +| Elements A-K | Elements L-Z | Helper functions | +|-----|----|-----| +| [<addObjects>](#addobjects)
[<attributes>](#attribute)
[<bytes>](#bytes)
[<commandLine>](#commandline)
[<component>](#component)
[<condition>](#condition)
[<conditions>](#conditions)
[<content>](#content)
[<contentModify>](#contentmodify)
[<description>](#description)
[<destinationCleanup>](#destinationcleanup)
[<detect>](#detect)
[<detects>](#detects)
[<detection>](#detection)
[<displayName>](#displayname)
[<environment>](#bkmk-environment)
[<exclude>](#exclude)
[<excludeAttributes>](#excludeattributes)
[<extensions>](#extensions)
[<extension>](#extension)
[<externalProcess>](#externalprocess)
[<icon>](#icon)
[<include>](#include)
[<includeAttribute>](#includeattributes) | [<library>](#library)
[<location>](#location)
[<locationModify>](#locationmodify)
[<_locDefinition>](#locdefinition)
[<manufacturer>](#manufacturer)
[<merge>](#merge)
[<migration>](#migration)
[<namedElements>](#namedelements)
[<object>](#object)
[<objectSet>](#objectset)
[<path>](#path)
[<paths>](#paths)
[<pattern>](#pattern)
[<processing>](#processing)
[<plugin>](#plugin)
[<role>](#role)
[<rules>](#rules)
[<script>](#script)
[<text>](#text)
[<unconditionalExclude>](#unconditionalexclude)
[<variable>](#variable)
[<version>](#version)
[<windowsObjects>](#windowsobjects) | [<condition> functions](#conditionfunctions)
[<content> functions](#contentfunctions)
[<contentModify> functions](#contentmodifyfunctions)
[<include> and <exclude> filter functions](#persistfilterfunctions)
[<locationModify> functions](#locationmodifyfunctions)
[<merge> functions](#mergefunctions)
[<script> functions](#scriptfunctions)
[Internal USMT functions](#internalusmtfunctions) | ## <addObjects> - The <addObjects> element emulates the existence of one or more objects on the source computer. The child <object> elements provide the details of the emulated objects. If the content is a <script> element, the result of the invocation will be an array of objects. - **Number of occurrences:** unlimited @@ -131,13 +54,14 @@ The <addObjects> element emulates the existence of one or more objects on Syntax: -<addObjects> - -</addObjects> +```xml + + +``` The following example is from the MigApp.xml file: -``` xml +```xml %HklmWowSoftware%\Microsoft\Office\12.0\Common\Migration\Office [UpgradeVersion] @@ -154,7 +78,6 @@ The following example is from the MigApp.xml file: ## <attributes> - The <attributes> element defines the attributes for a registry key or file. - **Number of occurrences:** once for each <object> @@ -165,53 +88,17 @@ The <attributes> element defines the attributes for a registry key or file Syntax: -<attributes>*Content*</attributes> - - ----- - - - - - - - - - - - - - - -
SettingRequired?Value

Content

Yes

The content depends on the type of object specified.

-
    -
  • For files, the content can be a string containing any of the following attributes separated by commas:

    -
      -
    • Archive

    • -
    • Read-only

    • -
    • System

    • -
    • Hidden

    • -
  • -
  • For registry keys, the content can be one of the following types:

    -
      -
    • None

    • -
    • String

    • -
    • ExpandString

    • -
    • Binary

    • -
    • Dword

    • -
    • REG_SZ

    • -
  • -
- +```xml +Content +``` +| Setting | Required? | Value | +|------|-----|----| +| *Content* | Yes | The content depends on the type of object specified.
  • For files, the content can be a string containing any of the following attributes separated by commas:
    • Archive
    • Read-only
    • System
    • Hidden
  • For registry keys, the content can be one of the following types:
    • None
    • String
    • ExpandString
    • Binary
    • Dword
    • REG_SZ
| The following example is from the MigApp.xml file: -``` xml +```xml %HklmWowSoftware%\Microsoft\Office\12.0\Common\Migration\Office [Lang] DWORD @@ -221,7 +108,6 @@ The following example is from the MigApp.xml file: ## <bytes> - You must specify the <bytes> element only for files because, if <location> corresponds to a registry key or a directory, then <bytes> will be ignored. - **Number of occurrences:** zero or one @@ -232,49 +118,19 @@ You must specify the <bytes> element only for files because, if <locati Syntax: -<bytes string="Yes|No" expand="Yes|No">*Content*</bytes> - - ----- - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

string

No, default is No

Determines whether Content should be interpreted as a string or as bytes.

expand

No (default = Yes

When the expand parameter is Yes, the content of the <bytes> element is first expanded in the context of the source computer and then interpreted.

Content

Yes

Depends on the value of the string.

-
    -
  • When the string is Yes: the content of the <bytes> element is interpreted as a string.

  • -
  • When the string is No: the content of the <bytes> element is interpreted as bytes. Each two characters represent the hexadecimal value of a byte. For example, "616263" is the representation for the "abc" ANSI string. A complete representation of the UNICODE string "abc" including the string terminator would be: "6100620063000000".

  • -
- +```xml +Content +``` +|Setting|Required?|Value| +|--- |--- |--- | +|string|No, default is No|Determines whether *Content* should be interpreted as a string or as bytes.| +|expand|No (default = Yes|When the expand parameter is Yes, the content of the <bytes> element is first expanded in the context of the source computer and then interpreted.| +|*Content*|Yes|Depends on the value of the string.
  • When the string is Yes: the content of the <bytes> element is interpreted as a string.
  • When the string is No: the content of the <bytes> element is interpreted as bytes. Each two characters represent the hexadecimal value of a byte. For example, "616263" is the representation for the "abc" ANSI string. A complete representation of the UNICODE string "abc" including the string terminator would be: "6100620063000000".
| The following example is from the MigApp.xml file: -``` xml +```xml %HklmWowSoftware%\Microsoft\Office\12.0\Common\Migration\Office [Lang] DWORD @@ -295,35 +151,16 @@ You might want to use the <commandLine> element if you want to start or st Syntax: -<commandLine>*CommandLineString*</commandLine> - - ----- - - - - - - - - - - - - - - -
SettingRequired?Value

CommandLineString

Yes

A valid command line.

- +```xml +CommandLineString +``` +|Setting|Required?|Value| +|--- |--- |--- | +|*CommandLineString*|Yes|A valid command line.| ## <component> - The <component> element is required in a custom .xml file. This element defines the most basic construct of a migration .xml file. For example, in the MigApp.xml file, "Microsoft® Office 2003" is a component that contains another component, "Microsoft Office Access® 2003". You can use the child elements to define the component. A component can be nested inside another component; that is, the <component> element can be a child of the <role> element within the <component> element in two cases: 1) when the parent <component> element is a container or 2) if the child <component> element has the same role as the parent <component> element. @@ -338,72 +175,23 @@ A component can be nested inside another component; that is, the <component&g Syntax: -<component type="System|Application|Device|Documents" context="User|System|UserAndSystem" defaultSupported="TRUE|FALSE|YES|NO" - -hidden="Yes|No"> - -</component> - - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

type

Yes

You can use the following to group settings, and define the type of the component.

-
    -
  • System: Operating system settings. All Windows® components are defined by this type.

    -

    When type="System" and defaultSupported="FALSE" the settings will not migrate unless there is an equivalent component in the .xml files that is specified on the LoadState command line. For example, the default MigSys.xml file contains components with type="System" and defaultSupported="FALSE". If you specify this file on the ScanState command line, you must also specify the file on the LoadState command line for the settings to migrate. This is because the LoadState tool must detect an equivalent component. That is, the component must have the same migration urlid of the .xml file and an identical display name. Otherwise, the LoadState tool will not migrate those settings from the store. This is helpful when the source computer is running Windows XP, and you are migrating to both Windows Vista and Windows XP because you can use the same store for both destination computers.

  • -
  • Application: Settings for an application.

  • -
  • Device: Settings for a device.

  • -
  • Documents: Specifies files.

  • -

context

No

-

Default = UserAndSystem

Defines the scope of this parameter; that is, whether to process this component in the context of the specific user, across the entire operating system, or both.

-

The largest possible scope is set by the <component> element. For example, if a <component> element has a context of User and a <rules> element had a context of UserAndSystem, then the <rules> element would act as though it has a context of User. If a <rules> element has a context of System, it would act as though the <rules> element is not there.

-
    -
  • User. Evaluates the component for each user.

  • -
  • System. Evaluates the component only once for the system.

  • -
  • UserAndSystem. Evaluates the component for the entire operating system and each user.

  • -

defaultSupported

No

-

(default = TRUE)

Can be any of TRUE, FALSE, YES or NO. If this parameter is FALSE (or NO), the component will not be migrated unless there is an equivalent component on the destination computer.

-

When type="System" and defaultSupported="FALSE" the settings will not migrate unless there is an equivalent component in the .xml files that are specified on the LoadState command line. For example, the default MigSys.xml file contains components with type="System" and defaultSupported="FALSE". If you specify this file on the ScanState command line, you must also specify the file on the LoadState command line for the settings to migrate. This is because the LoadState tool must detect an equivalent component. That is, the component must have the same migration urlid of the .xml file and an identical display name or the LoadState tool will not migrate those settings from the store. This is helpful when the source computer is running Windows XP, and you are migrating to both Windows Vista and Windows XP because you can use the same store for both destination computers.

hidden

This parameter is for internal USMT use only.

- +```xml + + +``` +|Setting|Required?|Value| +|--- |--- |--- | +| type | Yes | You can use the following to group settings, and define the type of the component.
  • **System:** Operating system settings. All Windows® components are defined by this type.
    When type="System" and defaultSupported="FALSE" the settings will not migrate unless there is an equivalent component in the .xml files that is specified on the LoadState command line. For example, the default MigSys.xml file contains components with type="System" and defaultSupported="FALSE". If you specify this file on the ScanState command line, you must also specify the file on the LoadState command line for the settings to migrate. This is because the LoadState tool must detect an equivalent component. That is, the component must have the same migration urlid of the .xml file and an identical display name. Otherwise, the LoadState tool will not migrate those settings from the store. This is helpful when the source computer is running Windows XP, and you are migrating to both Windows Vista and Windows XP because you can use the same store for both destination computers.
  • **Application:** Settings for an application.
  • **Device:** Settings for a device.
  • **Documents:** Specifies files.
| +| context | No
Default = UserAndSystem | Defines the scope of this parameter; that is, whether to process this component in the context of the specific user, across the entire operating system, or both.
The largest possible scope is set by the <component> element. For example, if a <component> element has a context of User and a <rules> element had a context of UserAndSystem, then the <rules> element would act as though it has a context of User. If a <rules> element has a context of System, it would act as though the <rules> element is not there.
  • **User**. Evaluates the component for each user.
  • **System**. Evaluates the component only once for the system.
  • **UserAndSystem**. Evaluates the component for the entire operating system and each user.
| +| defaultSupported | No
(default = TRUE) | Can be any of TRUE, FALSE, YES, or NO. If this parameter is FALSE (or NO), the component will not be migrated unless there is an equivalent component on the destination computer.
When type="System" and defaultSupported="FALSE" the settings will not migrate unless there is an equivalent component in the .xml files that are specified on the LoadState command line. For example, the default MigSys.xml file contains components with type="System" and defaultSupported="FALSE". If you specify this file on the ScanState command line, you must also specify the file on the LoadState command line for the settings to migrate. This is because the LoadState tool must detect an equivalent component. That is, the component must have the same migration urlid of the .xml file and an identical display name or the LoadState tool will not migrate those settings from the store. This is helpful when the source computer is running Windows XP, and you are migrating to both Windows Vista and Windows XP because you can use the same store for both destination computers. | +| hidden | | This parameter is for internal USMT use only. | For an example, see any of the default migration .xml files. ## <condition> - Although the <condition> element under the <detect>, <objectSet>, and <addObjects> elements is supported, we recommend that you do not use it. This element might be deprecated in future versions of USMT, requiring you to rewrite your scripts. We recommend that, if you need to use a condition within the <objectSet> and <addObjects> elements, you use the more powerful [<conditions>](#conditions) element, which allows you to formulate complex Boolean statements. The <condition> element has a Boolean result. You can use this element to specify the conditions in which the parent element will be evaluated. If any of the present conditions return FALSE, the parent element will not be evaluated. @@ -418,43 +206,20 @@ The <condition> element has a Boolean result. You can use this element to Syntax: -<condition negation="Yes|No">*ScriptName*</condition> - - ----- - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

negation

No

-

Default = No

"Yes" reverses the True/False value of the condition.

ScriptName

Yes

A script that has been defined within this migration section.

- +```xml +ScriptName +``` +|Setting|Required?|Value| +|--- |--- |--- | +|negation|No
Default = No|"Yes" reverses the True/False value of the condition.| +|*ScriptName*|Yes|A script that has been defined within this migration section.| For example, In the code sample below, the <condition> elements, A and B, are joined together by the AND operator because they are in separate <conditions> sections. For example: -``` xml +```xml A @@ -467,7 +232,7 @@ In the code sample below, the <condition> elements, A and B, are joined to However, in the code sample below, the <condition> elements, A and B, are joined together by the OR operator because they are in the same <conditions> section. -``` xml +```xml A @@ -490,42 +255,18 @@ The <condition> functions return a Boolean value. You can use these elemen All matches are case insensitive. - Syntax: DoesOSMatch("*OSType*","*OSVersion*") + Syntax: `DoesOSMatch("OSType","OSVersion")` - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

OSType

Yes

The only valid value for this setting is NT. Note, however, that you must set this setting for the <condition> functions to work correctly.

OSVersion

Yes

The major version, minor version, build number and corrected service diskette version separated by periods. For example, 5.0.2600.Service Pack 1. You can also specify partial specification of the version with a pattern. For example, 5.0.*.

+ |Setting|Required?|Value| + |--- |--- |--- | + |*OSType*|Yes|The only valid value for this setting is **NT**. Note, however, that you must set this setting for the <condition> functions to work correctly.| + |*OSVersion*|Yes|The major version, minor version, build number and corrected service diskette version separated by periods. For example, `5.0.2600.Service Pack 1`. You can also specify partial specification of the version with a pattern. For example, `5.0.*`.| + For example: - -~~~ -For example: - -<condition>MigXmlHelper.DoesOSMatch("NT","\*")</condition> -~~~ + ```xml + MigXmlHelper.DoesOSMatch("NT","\*") + ``` - **IsNative64Bit** @@ -535,78 +276,29 @@ For example: All comparisons are case insensitive. - Syntax: IsOSLaterThan("*OSType*","*OSVersion*") + Syntax: `IsOSLaterThan("OSType","OSVersion")` - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

OSType

Yes

Can be 9x or NT. If OSType does not match the type of the current operating system, then it returns FALSE. For example, if the current operating system is Windows NT-based and OSType is "9x", the result will be FALSE.

OSVersion

Yes

The major version, minor version, build number, and corrected service diskette version separated by periods. For example, 5.0.2600.Service Pack 1. You can also specify partial specification of the version but no pattern is allowed. For example, 5.0.

-

The IsOSLaterThan function returns TRUE if the current operating system is later than or equal to OSVersion.

+ |Setting|Required?|Value| + |--- |--- |--- | + |*OSType*|Yes|Can be **9x** or **NT**. If *OSType* does not match the type of the current operating system, then it returns FALSE. For example, if the current operating system is Windows NT-based and *OSType* is "9x", the result will be FALSE.| + |*OSVersion*|Yes|The major version, minor version, build number, and corrected service diskette version separated by periods. For example, `5.0.2600.Service Pack 1`. You can also specify partial specification of the version but no pattern is allowed. For example, `5.0`.

The IsOSLaterThan function returns TRUE if the current operating system is later than or equal to *OSVersion*.| + For example: - -~~~ -For example: - -<condition negation="Yes">MigXmlHelper.IsOSLaterThan("NT","6.0")</condition> -~~~ + ```xml + MigXmlHelper.IsOSLaterThan("NT","6.0") + ``` - **IsOSEarlierThan** All comparisons are case insensitive. - Syntax: IsOSEarlierThan("*OSType*","*OSVersion*") - - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

OSType

Yes

Can be 9x or NT. If OSType does not match the type of the current operating system, then it returns FALSE. For example, if the current operating system is Windows NT-based and OSType is "9x" the result will be FALSE.

OSVersion

Yes

The major version, minor version, build number, and corrected service diskette version separated by periods. For example, 5.0.2600.Service Pack 1. You can also specify partial specification of the version but no pattern is allowed. For example, 5.0.

-

The IsOSEarlierThan function returns TRUE if the current operating system is earlier than OSVersion.

+ Syntax: `IsOSEarlierThan("OSType","OSVersion")` + |Setting|Required?|Value| + |--- |--- |--- | + |*OSType*|Yes|Can be **9x** or **NT**. If *OSType* does not match the type of the current operating system, then it returns FALSE. For example, if the current operating system is Windows NT-based and *OSType* is "9x" the result will be FALSE.| + |*OSVersion*|Yes|The major version, minor version, build number, and corrected service diskette version separated by periods. For example, `5.0.2600.Service Pack 1`. You can also specify partial specification of the version but no pattern is allowed. For example, `5.0`.

The IsOSEarlierThan function returns TRUE if the current operating system is earlier than *OSVersion*.| ### Object content functions @@ -615,405 +307,140 @@ For example: The DoesObjectExist function returns TRUE if any object exists that matches the location pattern. Otherwise, it returns FALSE. The location pattern is expanded before attempting the enumeration. - Syntax: DoesObjectExist("*ObjectType*","*EncodedLocationPattern*") + Syntax: `DoesObjectExist("ObjectType","EncodedLocationPattern")` - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

ObjectType

Yes

Defines the object type. Can be File or Registry.

EncodedLocationPattern

Yes

The location pattern. Environment variables are allowed.

+ |Setting|Required?|Value| + |--- |--- |--- | + |*ObjectType*|Yes|Defines the object type. Can be File or Registry.| + |*EncodedLocationPattern*|Yes|The [location pattern](#locations). Environment variables are allowed.| - - -~~~ -For an example of this element, see the MigApp.xml file. -~~~ + For an example of this element, see the MigApp.xml file. - **DoesFileVersionMatch** The pattern check is case insensitive. - Syntax: DoesFileVersionMatch("*EncodedFileLocation*","*VersionTag*","*VersionValue*") + Syntax: `DoesFileVersionMatch("EncodedFileLocation","VersionTag","VersionValue")` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

EncodedFileLocation

Yes

The location pattern for the file that will be checked. Environment variables are allowed.

VersionTag

Yes

The version tag value that will be checked.

VersionValue

Yes

A string pattern. For example, "Microsoft*".

+ |Setting|Required?|Value| + |--- |--- |--- | + |*EncodedFileLocation*|Yes|The [location pattern](#locations) for the file that will be checked. Environment variables are allowed.| + |*VersionTag*|Yes|The [version tag](#allowed) value that will be checked.| + |*VersionValue*|Yes|A string pattern. For example, "Microsoft*".| + For example: - -~~~ -For example: - -<condition>MigXmlHelper.DoesFileVersionMatch("%MSNMessengerInstPath%\\msnmsgr.exe","ProductVersion","6.\*")</condition> - -<condition>MigXmlHelper.DoesFileVersionMatch("%MSNMessengerInstPath%\\msnmsgr.exe","ProductVersion","7.\*")</condition> -~~~ + ```xml + MigXmlHelper.DoesFileVersionMatch("%MSNMessengerInstPath%\\msnmsgr.exe","ProductVersion","6.\*") MigXmlHelper.DoesFileVersionMatch("%MSNMessengerInstPath%\\msnmsgr.exe","ProductVersion","7.\*") + ``` - **IsFileVersionAbove** The IsFileVersionAbove function returns TRUE if the version of the file is higher than *VersionValue*. - Syntax: IsFileVersionAbove("*EncodedFileLocation*","*VersionTag*","*VersionValue*") - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

EncodedFileLocation

Yes

The location pattern for the file that will be checked. Environment variables are allowed.

VersionTag

Yes

The version tag value that will be checked.

VersionValue

Yes

The value to compare to. You cannot specify a pattern.

- + Syntax: `IsFileVersionAbove("EncodedFileLocation","VersionTag","VersionValue")` + |Setting|Required?|Value| + |--- |--- |--- | + |*EncodedFileLocation*|Yes|The [location pattern](#locations) for the file that will be checked. Environment variables are allowed.| + |*VersionTag*|Yes|The [version tag](#allowed) value that will be checked.| + |*VersionValue*|Yes|The value to compare to. You cannot specify a pattern.| - **IsFileVersionBelow** - Syntax: IsFileVersionBelow("*EncodedFileLocation*","*VersionTag*","*VersionValue*") - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

EncodedFileLocation

Yes

The location pattern for the file that will be checked. Environment variables are allowed.

VersionTag

Yes

The version tag value that will be checked.

VersionValue

Yes

The value to compare to. You cannot specify a pattern.

- + Syntax: `IsFileVersionBelow("EncodedFileLocation","VersionTag","VersionValue")` + |Setting|Required?|Value| + |--- |--- |--- | + |*EncodedFileLocation*|Yes|The [location pattern](#locations) for the file that will be checked. Environment variables are allowed.| + |*VersionTag*|Yes|The [version tag](#allowed) value that will be checked.| + |*VersionValue*|Yes|The value to compare to. You cannot specify a pattern.| - **IsSystemContext** The IsSystemContext function returns TRUE if the current context is "System". Otherwise, it returns FALSE. - Syntax: IsSystemContext() + Syntax: `IsSystemContext()` - **DoesStringContentEqual** The DoesStringContentEqual function returns TRUE if the string representation of the given object is identical to `StringContent`. - Syntax: DoesStringContentEqual("*ObjectType*","*EncodedLocation*","*StringContent*") + Syntax: `DoesStringContentEqual("ObjectType","EncodedLocation","StringContent")` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

ObjectType

Yes

Defines the type of object. Can be File or Registry.

EncodedLocationPattern

Yes

The encoded location for the object that will be examined. You can specify environment variables.

StringContent

Yes

The string that will be checked against.

+ |Setting|Required?|Value| + |--- |--- |--- | + |*ObjectType*|Yes|Defines the type of object. Can be File or Registry.| + |*EncodedLocationPattern*|Yes|The [encoded location](#locations) for the object that will be examined. You can specify environment variables.| + |StringContent|Yes|The string that will be checked against.| + For example: - -~~~ -For example: - -``` xml -MigXmlHelper.DoesStringContentEqual("File","%USERNAME%","") -``` -~~~ + ```xml + MigXmlHelper.DoesStringContentEqual("File","%USERNAME%","") + ``` - **DoesStringContentContain** The DoesStringContentContain function returns TRUE if there is at least one occurrence of *StrToFind* in the string representation of the object. - Syntax: DoesStringContentContain("*ObjectType*","*EncodedLocation*","*StrToFind*") - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

ObjectType

Yes

Defines the type of object. Can be File or Registry.

EncodedLocationPattern

Yes

The encoded location for the object that will be examined. You can specify environment variables.

StrToFind

Yes

A string that will be searched inside the content of the given object.

- + Syntax: `DoesStringContentContain("ObjectType","EncodedLocation","StrToFind")` + |Setting|Required?|Value| + |--- |--- |--- | + |*ObjectType*|Yes|Defines the type of object. Can be File or Registry.| + |*EncodedLocationPattern*|Yes|The [encoded location](#locations) for the object that will be examined. You can specify environment variables.| + |*StrToFind*|Yes|A string that will be searched inside the content of the given object.| - **IsSameObject** The IsSameObject function returns TRUE if the given encoded locations resolve to the same physical object. Otherwise, it returns FALSE. - Syntax: IsSameObject("*ObjectType*","*EncodedLocation1*","*EncodedLocation2*") + Syntax: `IsSameObject("ObjectType","EncodedLocation1","EncodedLocation2")` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

ObjectType

Yes

Defines the type of object. Can be File or Registry.

EncodedLocation1

Yes

The encoded location for the first object. You can specify environment variables.

EncodedLocation2

Yes

The encoded location for the second object. You can specify environment variables.

+ |Setting|Required?|Value| + |--- |--- |--- | + |*ObjectType*|Yes|Defines the type of object. Can be File or Registry.| + |*EncodedLocation1*|Yes|The [encoded location](#locations) for the first object. You can specify environment variables.| + |*EncodedLocation2*|Yes|The [encoded location](#locations) for the second object. You can specify environment variables.| + For example: - -~~~ -For example: - -``` xml - + ```xml + MigXmlHelper.IsSameObject("File","%CSIDL_FAVORITES%","%CSIDL_COMMON_FAVORITES%") %CSIDL_FAVORITES%\* [*] - -``` -~~~ + + ``` - **IsSameContent** The IsSameContent function returns TRUE if the given objects have the same content. Otherwise, it returns FALSE. The content will be compared byte by byte. - Syntax: IsSameContent("*ObjectType1*","*EncodedLocation1*","*ObjectType2*","*EncodedLocation2*") - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

ObjectType1

Yes

Defines the type of the first object. Can be File or Registry.

EncodedLocation1

Yes

The encoded location for the first object. You can specify environment variables.

ObjectType2

Yes

Defines the type of the second object. Can be File or Registry.

EncodedLocation2

Yes

The encoded location for the second object. You can specify environment variables.

- + Syntax: `IsSameContent("ObjectType1","EncodedLocation1","ObjectType2","EncodedLocation2")` + |Setting|Required?|Value| + |--- |--- |--- | + |*ObjectType1*|Yes|Defines the type of the first object. Can be File or Registry.| + |*EncodedLocation1*|Yes|The [encoded location](#locations) for the first object. You can specify environment variables.| + |*ObjectType2*|Yes|Defines the type of the second object. Can be File or Registry.| + |*EncodedLocation2*|Yes|The [encoded location](#locations) for the second object. You can specify environment variables.| - **IsSameStringContent** The IsSameStringContent function returns TRUE if the given objects have the same content. Otherwise, it returns FALSE. The content will be interpreted as a string. - Syntax: IsSameStringContent("*ObjectType1*","*EncodedLocation1*","*ObjectType2*","*EncodedLocation2*") - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

ObjectType1

Yes

Defines the type of the first object. Can be File or Registry.

EncodedLocation1

Yes

The encoded location for the first object. You can specify environment variables.

ObjectType2

Yes

Defines the type of the second object. Can be File or Registry.

EncodedLocation2

Yes

The encoded location for the second object. You can specify environment variables.

- + Syntax: `IsSameStringContent("ObjectType1","EncodedLocation1","ObjectType2","EncodedLocation2")` + |Setting|Required?|Value| + |--- |--- |--- | + |*ObjectType1*|Yes|Defines the type of the first object. Can be File or Registry.| + |*EncodedLocation1*|Yes|The [encoded location](#locations) for the first object. You can specify environment variables.| + |*ObjectType2*|Yes|Defines the type of the second object. Can be File or Registry.| + |*EncodedLocation2*|Yes|The [encoded location](#locations) for the second object. You can specify environment variables.| ## <conditions> - The <conditions> element returns a Boolean result that is used to specify the conditions in which the parent element is evaluated. USMT evaluates the child elements, and then joins their results using the operators AND or OR according to the **operation** parameter. - **Number of occurrences:** Unlimited inside another <conditions> element. Limited to one occurrence in [<detection>](#detection), [<rules>](#rules), [<addObjects>](#addobjects), and [<objectSet>](#objectset) @@ -1024,37 +451,18 @@ The <conditions> element returns a Boolean result that is used to specify Syntax: -<conditions operation="AND|OR"> - -</conditions> - - ----- - - - - - - - - - - - - - - -
SettingRequired?Value

operation

No, default = AND

Defines the Boolean operation that is performed on the results that are obtained from the child elements.

- +```xml + + +``` +|Setting|Required?|Value| +|--- |--- |--- | +|operation|No, default = AND|Defines the Boolean operation that is performed on the results that are obtained from the child elements.| The following example is from the MigApp.xml file: -``` xml +```xml MigXmlHelper.IsNative64Bit() @@ -1067,7 +475,6 @@ The following example is from the MigApp.xml file: ## <content> - You can use the <content> element to specify a list of object patterns to obtain an object set from the source computer. Each <objectSet> within a <content> element is evaluated. For each resulting object pattern list, the objects that match it are enumerated and their content is filtered by the filter parameter. The resulting string array is the output for the <content> element. The filter script returns an array of locations. The parent <objectSet> element can contain multiple child <content> elements. - **Number of occurrences:** unlimited @@ -1080,34 +487,14 @@ You can use the <content> element to specify a list of object patterns to Syntax: -<content filter="*ScriptInvocation*"> - -</content> - - ----- - - - - - - - - - - - - - - -
SettingRequired?Value

filter

Yes

A script followed by any number of string arguments that are separated by a comma and enclosed in parenthesis. For example, MyScripts.AScript ("Arg1","Arg2").

-

The script is called for each object that is enumerated by the object sets in the <include> rule. The filter script returns a Boolean value. If the return value is TRUE, the object will be migrated. If it is FALSE, it will not be migrated.

- +```xml + + +``` +|Setting|Required?|Value| +|--- |--- |--- | +|filter|Yes|A script followed by any number of string arguments that are separated by a comma and enclosed in parenthesis. For example, `MyScripts.AScript ("Arg1","Arg2")`.
The script is called for each object that is enumerated by the object sets in the <include> rule. The filter script returns a Boolean value. If the return value is TRUE, the object will be migrated. If it is FALSE, it will not be migrated.| ### <content> functions @@ -1117,50 +504,24 @@ The following functions generate patterns out of the content of an object. These If the registry value is a MULTI-SZ, only the first segment is processed. The returned pattern is the encoded location for a file that must exist on the system. If the specification is correct in the registry value, but the file does not exist, this function returns NULL. - Syntax: ExtractSingleFile(*Separators*,*PathHints*) + Syntax: `ExtractSingleFile(Separators,PathHints)` - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

Separators

Yes

A list of possible separators that might follow the file specification in this registry value name. For example, if the content is "C:\Windows\Notepad.exe,-2", the separator is a comma. You can specify NULL.

PathHints

Yes

A list of extra paths, separated by colons (;), where the function will look for a file matching the current content. For example, if the content is "Notepad.exe" and the path is the %Path% environment variable, the function will find Notepad.exe in %windir% and returns "c:\Windows [Notepad.exe]". You can specify NULL.

+ |Setting|Required?|Value| + |--- |--- |--- | + |*Separators*|Yes|A list of possible separators that might follow the file specification in this registry value name. For example, if the content is "C:\Windows\Notepad.exe,-2", the separator is a comma. You can specify NULL.| + |*PathHints*|Yes|A list of extra paths, separated by colons (;), where the function will look for a file matching the current content. For example, if the content is "Notepad.exe" and the path is the %Path% environment variable, the function will find Notepad.exe in %windir% and returns "c:\Windows [Notepad.exe]". You can specify NULL.| + For example: + ```xml + + ``` -~~~ -For example: + and -``` xml - -``` - -and - -``` xml - -``` -~~~ + ```xml + + ``` - **ExtractMultipleFiles** @@ -1168,94 +529,39 @@ and The returned patterns are the encoded locations for files that must exist on the source computer. If the specification is correct in the registry value but the file does not exist, it will not be included in the resulting list. - Syntax: ExtractMultipleFiles(*Separators*,*PathHints*) - - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

Separators

Yes

A list of possible separators that might follow the file specification in this registry value name. For example, if the content is "C:\Windows\Notepad.exe,-2", the separator is a comma. This parameter must be NULL when processing MULTI-SZ registry values.

PathHints

Yes

A list of extra paths, separated by colons (;), where the function will look for a file matching the current content. For example, if the content is "Notepad.exe" and the path is the %Path% environment variable, the function will find Notepad.exe in %windir% and returns "c:\Windows [Notepad.exe]". You can specify NULL.

- + Syntax: `ExtractMultipleFiles(Separators,PathHints)` + |Setting|Required?|Value| + |--- |--- |--- | + |*Separators*|Yes|A list of possible separators that might follow the file specification in this registry value name. For example, if the content is "C:\Windows\Notepad.exe,-2", the separator is a comma. This parameter must be NULL when processing MULTI-SZ registry values.| + |*PathHints*|Yes|A list of extra paths, separated by colons (;), where the function will look for a file matching the current content. For example, if the content is "Notepad.exe" and the path is the %Path% environment variable, the function will find Notepad.exe in %windir% and returns "c:\Windows [Notepad.exe]". You can specify NULL.| - **ExtractDirectory** The ExtractDirectory function returns a pattern that is the encoded location for a directory that must exist on the source computer. If the specification is correct in the registry value, but the directory does not exist, this function returns NULL. If it is processing a registry value that is a MULTI-SZ, only the first segment will be processed. - Syntax: ExtractDirectory(*Separators*,*LevelsToTrim*,*PatternSuffix*) + Syntax: `ExtractDirectory(Separators,LevelsToTrim,PatternSuffix)` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

Separators

No

A list of possible separators that might follow the file specification in this registry value name. For example, if the content is "C:\Windows\Notepad.exe,-2", the separator is a comma. You must specify NULL when processing MULTI-SZ registry values.

LevelsToTrim

Yes

The number of levels to delete from the end of the directory specification. Use this function to extract a root directory when you have a registry value that points inside that root directory in a known location.

PatternSuffix

Yes

The pattern to add to the directory specification. For example, * [*].

+ |Setting|Required?|Value| + |--- |--- |--- | + |*Separators*|No|A list of possible separators that might follow the file specification in this registry value name. For example, if the content is "C:\Windows\Notepad.exe,-2", the separator is a comma. You must specify NULL when processing MULTI-SZ registry values.| + |*LevelsToTrim*|Yes|The number of levels to delete from the end of the directory specification. Use this function to extract a root directory when you have a registry value that points inside that root directory in a known location.| + |*PatternSuffix*|Yes|The pattern to add to the directory specification. For example, `* [*]`.| + For example: - -~~~ -For example: - -``` xml - + ```xml + %HklmWowSoftware%\Classes\Software\RealNetworks\Preferences\DT_Common [] - -``` -~~~ + + ``` ## <contentModify> - The <contentModify> element modifies the content of an object before it is written to the destination computer. For each <contentModify> element there can be multiple <objectSet> elements. This element returns the new content of the object that is being processed. - **Number of occurrences:** Unlimited @@ -1268,34 +574,14 @@ The <contentModify> element modifies the content of an object before it is Syntax: -<contentModify script="*ScriptInvocation*"> - -</contentModify> - - ----- - - - - - - - - - - - - - - -
SettingRequired?Value

script

Yes

A script followed by any number of string arguments that are separated by a comma and enclosed in parenthesis. For example, MyScripts.AScript ("Arg1","Arg2").

-

The script will be called for each object that is enumerated by the object sets in the include rule. The filter script returns a Boolean value. If the return value is TRUE, the object will be migrated. If it is FALSE, it will not be migrated.

- +```xml + + +``` +|Setting|Required?|Value| +|--- |--- |--- | +|script|Yes|A script followed by any number of string arguments that are separated by a comma and enclosed in parenthesis. For example, `MyScripts.AScript ("Arg1","Arg2").`

The script will be called for each object that is enumerated by the object sets in the include rule. The filter script returns a Boolean value. If the return value is TRUE, the object will be migrated. If it is FALSE, it will not be migrated.| ### <contentModify> functions @@ -1305,284 +591,95 @@ The following functions change the content of objects as they are migrated. Thes The ConvertToDWORD function converts the content of registry values that are enumerated by the parent <ObjectSet> element to a DWORD. For example, ConvertToDWORD will convert the string "1" to the DWORD 0x00000001. If the conversion fails, then the value of DefaultValueOnError will be applied. - Syntax: ConvertToDWORD(*DefaultValueOnError*) - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

DefaultValueOnError

No

The value that will be written into the value name if the conversion fails. You can specify NULL, and 0 will be written if the conversion fails.

- + Syntax: `ConvertToDWORD(DefaultValueOnError)` + |Setting|Required?|Value| + |--- |--- |--- | + |*DefaultValueOnError*|No|The value that will be written into the value name if the conversion fails. You can specify NULL, and 0 will be written if the conversion fails.| - **ConvertToString** The ConvertToString function converts the content of registry values that match the parent <ObjectSet> element to a string. For example, it will convert the DWORD 0x00000001 to the string "1". If the conversion fails, then the value of DefaultValueOnError will be applied. - Syntax: ConvertToString(*DefaultValueOnError*) + Syntax: `ConvertToString(DefaultValueOnError)` - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

DefaultValueOnError

No

The value that will be written into the value name if the conversion fails. You can specify NULL, and 0 will be written if the conversion fails.

+ |Setting|Required?|Value| + |--- |--- |--- | + |*DefaultValueOnError*|No|The value that will be written into the value name if the conversion fails. You can specify NULL, and 0 will be written if the conversion fails.| + For example: - -~~~ -For example: - -``` xml - + ```xml + HKCU\Control Panel\Desktop [ScreenSaveUsePassword] - -``` -~~~ + + ``` - **ConvertToBinary** The ConvertToBinary function converts the content of registry values that match the parent <ObjectSet> element to a binary type. - Syntax: ConvertToBinary () + Syntax: `ConvertToBinary ()` - **OffsetValue** The OffsetValue function adds or subtracts *Value* from the value of the migrated object, and then writes the result back into the registry value on the destination computer. For example, if the migrated object is a DWORD with a value of 14, and the *Value* is "-2", the registry value will be 12 on the destination computer. - Syntax: OffsetValue(*Value*) - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

Value

Yes

The string representation of a numeric value. It can be positive or negative. For example, OffsetValue(2).

- + Syntax: `OffsetValue(Value)` + |Setting|Required?|Value| + |--- |--- |--- | + |*Value*|Yes|The string representation of a numeric value. It can be positive or negative. For example, `OffsetValue(2)`.| - **SetValueByTable** The SetValueByTable function matches the value from the source computer to the source table. If the value is there, the equivalent value in the destination table will be applied. If the value is not there, or if the destination table has no equivalent value, the *DefaultValueOnError* will be applied. - Syntax: SetValueByTable(*SourceTable*,*DestinationTable*,*DefaultValueOnError*) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

SourceTable

Yes

A list of values separated by commas that are possible for the source registry values.

DestinationTable

No

A list of translated values separated by commas.

DefaultValueOnError

No

The value that will be applied to the destination computer if either 1) the value for the source computer does not match SourceTable, or 2) DestinationTable has no equivalent value.

-

If DefaultValueOnError is NULL, the value will not be changed on the destination computer.

- + Syntax: `SetValueByTable(SourceTable,DestinationTable,DefaultValueOnError)` + |Setting|Required?|Value| + |--- |--- |--- | + |*SourceTable*|Yes|A list of values separated by commas that are possible for the source registry values.| + |*DestinationTable*|No|A list of translated values separated by commas.| + |*DefaultValueOnError*|No|The value that will be applied to the destination computer if either 1) the value for the source computer does not match *SourceTable*, or 2) *DestinationTable* has no equivalent value.

If DefaultValueOnError is NULL, the value will not be changed on the destination computer.| - **KeepExisting** You can use the KeepExisting function when there are conflicts on the destination computer. This function will keep (not overwrite) the specified attributes for the object that is on the destination computer. - Syntax: KeepExisting("*OptionString*","*OptionString*","*OptionString*",…) - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

OptionString

Yes

OptionString can be Security, TimeFields, or FileAttrib:Letter. You can specify one of each type of OptionStrings. Do not specify multiple OptionStrings with the same value. If you do, the right-most option of that type will be kept. For example, do not specify ("FileAttrib:H", "FileAttrib:R") because only Read-only will be evaluated. Instead specify ("FileAttrib:HR") and both Hidden and Read-only attributes will be kept on the destination computer.

-
    -
  • Security. Keeps the destination object's security descriptor if it exists.

  • -
  • TimeFields. Keeps the destination object's time stamps. This parameter is for files only.

  • -
  • FileAttrib:Letter. Keeps the destination object's attribute value, either On or OFF, for the specified set of file attributes. This parameter is for files only. The following are case-insensitive, but USMT will ignore any values that are invalid, repeated, or if there is a space after "FileAttrib:". You can specify any combination of the following attributes:

    -
      -
    • A = Archive

    • -
    • C = Compressed

    • -
    • E = Encrypted

    • -
    • H = Hidden

    • -
    • I = Not Content Indexed

    • -
    • O = Offline

    • -
    • R = Read-Only

    • -
    • S = System

    • -
    • T = Temporary

    • -
  • -
- + Syntax: `KeepExisting("OptionString","OptionString","OptionString",…)` + |Setting|Required?|Value| + |--- |--- |--- | + | *OptionString* | Yes | *OptionString* can be **Security**, **TimeFields**, or **FileAttrib**:*Letter*. You can specify one of each type of *OptionStrings*. Do not specify multiple *OptionStrings* with the same value. If you do, the right-most option of that type will be kept. For example, do not specify **("FileAttrib:H", "FileAttrib:R")** because only Read-only will be evaluated. Instead specify **("FileAttrib:HR")** and both Hidden and Read-only attributes will be kept on the destination computer.
  • **Security**. Keeps the destination object's security descriptor if it exists.
  • **TimeFields**. Keeps the destination object's time stamps. This parameter is for files only.
  • **FileAttrib:** *Letter*. Keeps the destination object's attribute value, either On or OFF, for the specified set of file attributes. This parameter is for files only. The following are case-insensitive, but USMT will ignore any values that are invalid, repeated, or if there is a space after "FileAttrib:". You can specify any combination of the following attributes:
    • **A** = Archive
    • **C** = Compressed
    • **E** = Encrypted
    • **H** = Hidden
    • **I** = Not Content Indexed
    • **O** = Offline
    • **R** = Read-Only
    • **S** = System
    • **T** = Temporary
| - **MergeMultiSzContent** The MergeMultiSzContent function merges the MULTI-SZ content of the registry values that are enumerated by the parent <ObjectSet> element with the content of the equivalent registry values that already exist on the destination computer. `Instruction` and `String` either remove or add content to the resulting MULTI-SZ. Duplicate elements will be removed. - Syntax: MergeMultiSzContent (*Instruction*,*String*,*Instruction*,*String*,…) - - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

Instruction

Yes

Can be one of the following:

-
    -
  • Add. Adds the corresponding String to the resulting MULTI-SZ if it is not already there.

  • -
  • Remove. Removes the corresponding String from the resulting MULTI-SZ.

  • -

String

Yes

The string to be added or removed.

- + Syntax: `MergeMultiSzContent (Instruction,String,Instruction,String,…)` + |Setting|Required?|Value| + |--- |--- |--- | + | *Instruction* | Yes | Can be one of the following:
  • **Add**. Adds the corresponding String to the resulting MULTI-SZ if it is not already there.
  • **Remove**. Removes the corresponding String from the resulting MULTI-SZ.
| + | *String* | Yes | The string to be added or removed. | - **MergeDelimitedContent** The MergeDelimitedContent function merges the content of the registry values that are enumerated by the parent <ObjectSet> element with the content of the equivalent registry values that already exist on the destination computer. The content is considered a list of elements separated by one of the characters in the Delimiters parameter. Duplicate elements will be removed. - Syntax: MergeDelimitedContent(*Delimiters*,*Instruction*,*String*,…) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

Delimiters

Yes

A single character that will be used to separate the content of the object that is being processed. The content will be considered as a list of elements that is separated by the Delimiters.

-

For example, "." will separate the string based on a period.

Instruction

Yes

Can one of the following:

-
    -
  • Add. Adds String to the resulting MULTI-SZ if it is not already there.

  • -
  • Remove. Removes String from the resulting MULTI-SZ.

  • -

String

Yes

The string to be added or removed.

- + Syntax: `MergeDelimitedContent(Delimiters,Instruction,String,…)` + |Setting|Required?|Value| + |--- |--- |--- | + | *Delimiters* | Yes | A single character that will be used to separate the content of the object that is being processed. The content will be considered as a list of elements that is separated by the *Delimiters*.
For example, "." will separate the string based on a period. | + | *Instruction* | Yes | Can one of the following:
  • **Add.** Adds *String* to the resulting MULTI-SZ if it is not already there.
  • **Remove.** Removes *String* from the resulting MULTI-SZ.
| + | *String* | Yes | The string to be added or removed. | ## <description> - The <description> element defines a description for the component but does not affect the migration. - **Number of occurrences:** zero or one @@ -1593,45 +690,26 @@ The <description> element defines a description for the component but does Syntax: -<description>*ComponentDescription*</description> - - ----- - - - - - - - - - - - - - - -
SettingRequired?Value

ComponentDescription

Yes

The description of the component.

- +```xml +ComponentDescription +``` +|Setting|Required?|Value| +|--- |--- |--- | +|*ComponentDescription*|Yes|The description of the component.| The following code sample shows how the <description> element defines the "My custom component" description.: -``` xml +```xml My custom component ``` ## <destinationCleanup> - The <destinationCleanup> element deletes objects, such as files and registry keys, from the destination computer before applying the objects from the source computer. This element is evaluated only when the LoadState tool is run on the destination computer. That is, this element is ignored by the ScanState tool. -**Important** -Use this option with extreme caution because it will delete objects from the destination computer. +> [!IMPORTANT] +> Use this option with extreme caution because it will delete objects from the destination computer. @@ -1645,38 +723,18 @@ For each <destinationCleanup> element there can be multiple <objectSet& Syntax: -<destinationCleanup filter=*ScriptInvocation*> - -</destinationCleanup> - - ----- - - - - - - - - - - - - - - -
SettingRequired?Value

filter

Yes

A script followed by any number of string arguments that are separated by a comma and enclosed in parenthesis. For example, MyScripts.AScript ("Arg1","Arg2").

-

The script will be called for each object that is enumerated by the object sets in the include rule. The filter script returns a Boolean value. If the return value is TRUE, the object will be migrated. If it is FALSE, it will not be migrated.

- +```xml + + +``` +|Setting|Required?|Value| +|--- |--- |--- | +|filter|Yes|A script followed by any number of string arguments that are separated by a comma and enclosed in parenthesis. For example, `MyScripts.AScript ("Arg1","Arg2")`.

The script will be called for each object that is enumerated by the object sets in the include rule. The filter script returns a Boolean value. If the return value is TRUE, the object will be migrated. If it is FALSE, it will not be migrated.| For example: -``` xml +```xml HKCU\Software\Lotus\123\99.0\DDE Preferences\* [*] @@ -1687,7 +745,6 @@ For example: ## <detect> - Although the <detect> element is still supported, we do not recommend using it because it may be deprecated in future versions of USMT. In that case, you would have to rewrite your scripts. Instead, we recommend that you use the [<detection>](#detection)**element.** You use the <detect> element to determine if the component is present on a system. If all child <detect> elements within a <detect> element resolve to TRUE, then the <detect> element resolves to TRUE. If any child <detect> elements resolve to FALSE, then their parent <detect> element resolves to FALSE. If there is no <detect> element section, then USMT will assume that the component is present. @@ -1704,61 +761,30 @@ For each <detect> element there can be multiple child <condition> or Syntax: -<detect name="*ID*" context="User|System|UserAndSystem"> - -</detect> - - ----- - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

name

Yes, when <detect> is a child to <namedElements>

-

No, when <detect> is a child to <detects>

When ID is specified, any child elements are not processed. Instead, any other <detect> elements with the same name that are declared within the <namedElements> element are processed.

context

No

-

(default = UserAndSystem)

Defines the scope of this parameter: whether to process this component in the context of the specific user, across the entire operating system, or both.

-

The largest possible scope is set by the component element. For example, if a <component> element has a context of User, and a <rules> element had a context of UserAndSystem, then the <rules> element would act as though it had a context of User. If the <rules> element had a context of System, it would act as though the <rules> element were not there.

-
    -
  • User. Evaluates the variables for each user.

  • -
  • System. Evaluates the variables only once for the system.

  • -
  • UserAndSystem. Evaluates the variables for the entire operating system and each user.

  • -
- +```xml + + +``` +|Setting|Required?|Value| +|--- |--- |--- | +| name | Yes, when <detect> is a child to <namedElements>
No, when <detect> is a child to <detects> | When *ID* is specified, any child elements are not processed. Instead, any other <detect> elements with the same name that are declared within the <namedElements> element are processed. | +| context | No
(default = UserAndSystem) | Defines the scope of this parameter: whether to process this component in the context of the specific user, across the entire operating system, or both.
The largest possible scope is set by the component element. For example, if a <component> element has a context of User, and a <rules> element had a context of UserAndSystem, then the <rules> element would act as though it had a context of User. If the <rules> element had a context of System, it would act as though the <rules> element were not there.
  • **User.** Evaluates the variables for each user.
  • **System.** Evaluates the variables only once for the system.
  • **UserAndSystem.** Evaluates the variables for the entire operating system and each user.
| For examples, see the examples for [<detection>](#detection). ## <detects> - Although the <detects> element is still supported, we recommend that you do not use it because it may be deprecated in future versions of USMT, which would require you to rewrite your scripts. Instead, we recommend that you use the [<detection>](#detection) element if the parent element is <role> or <namedElements>, and we recommend that you use the <conditions> element if the parent element is <rules>. Using <detection> allows you to more clearly formulate complex Boolean statements. The <detects> element is a container for one or more <detect> elements. If all of the child <detect> elements within a <detects> element resolve to TRUE, then <detects> resolves to TRUE. If any of the child <detect> elements resolve to FALSE, then <detects> resolves to FALSE. If you do not want to write the <detects> elements within a component, then you can create the <detects> element under the <namedElements> element, and then refer to it. If there is no <detects> element section, then USMT will assume that the component is present. The results from each <detects> element are joined together by the OR operator to form the rule used to detect the parent element. Syntax: -<detects name="*ID*" context="User|System|UserAndSystem"> - -</detects> +```xml + + +``` - **Number of occurrences:** Unlimited. @@ -1766,47 +792,14 @@ Syntax: - **Required child elements:** <detect> - ----- - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

name

Yes, when <detects> is a child to <namedElements>

-

No, when <detects> is a child to <role> or <rules>

When ID is specified, no child <detect> elements are processed. Instead, any other <detects> elements with the same name that are declared within the <namedElements> element are processed.

context

No

-

(default = UserAndSystem)

Defines the scope of this parameter: whether to process this component in the context of the specific user, across the entire operating system, or both.

-

The largest possible scope is set by the <component element>. For example, if a <component> element has a context of User and a <rules> element had a context of UserAndSystem, then the <rules> element would act as though it had a context of User. If the <rules> element had a context of System, it would act as though the <rules> element were not there.

-
    -
  • User. Evaluates the variables for each user.

  • -
  • System. Evaluates the variables only once for the system.

  • -
  • UserAndSystem. Evaluates the variables for the entire operating system and each user.

  • -
-

The context parameter is ignored for <detects> elements that are inside <rules> elements.

- - +|Setting|Required?|Value| +|--- |--- |--- | +| name | Yes, when <detects> is a child to <namedElements>
No, when <detects> is a child to <role> or <rules> | When *ID* is specified, no child <detect> elements are processed. Instead, any other <detects> elements with the same name that are declared within the <namedElements> element are processed. | +| context | No
(default = UserAndSystem) | Defines the scope of this parameter: whether to process this component in the context of the specific user, across the entire operating system, or both.
The largest possible scope is set by the <component element>. For example, if a <component> element has a context of User and a <rules> element had a context of UserAndSystem, then the <rules> element would act as though it had a context of User. If the <rules> element had a context of System, it would act as though the <rules> element were not there.
  • **User.** Evaluates the variables for each user.
  • **System.** Evaluates the variables only once for the system.
  • **UserAndSystem.** Evaluates the variables for the entire operating system and each user.

The context parameter is ignored for <detects> elements that are inside <rules> elements. | The following example is from the MigApp.xml file. -``` xml +```xml MigXmlHelper.DoesFileVersionMatch("%Lotus123InstPath%\123w.exe","ProductVersion","9.*") @@ -1834,50 +827,19 @@ Use the <detection> element under the <namedElements> element if you Syntax: -<detection name="*ID*" context="User|System|UserAndSystem"> - -</detection> - - ----- - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

name

    -
  • Yes, when <detection> is declared under <namedElements>

  • -
  • Optional, when declared under <role>

  • -

If declared, the content of the <detection> element is ignored and the content of the <detection> element with the same name that is declared in the <namedElements> element will be evaluated.

context

No, default = UserAndSystem

Defines the scope of this parameter: whether to process this component in the context of the specific user, across the entire operating system, or both.

-
    -
  • User. Evaluates the component for each user.

  • -
  • System. Evaluates the component only once for the system.

  • -
  • UserAndSystem. Evaluates the component for the entire operating system and each user.

  • -
- +```xml + + +``` +|Setting|Required?|Value| +|--- |--- |--- | +| name |
  • Yes, when <detection> is declared under <namedElements>
  • Optional, when declared under <role>
| If declared, the content of the <detection> element is ignored and the content of the <detection> element with the same name that is declared in the <namedElements> element will be evaluated. | +| context | No, default = UserAndSystem | Defines the scope of this parameter: whether to process this component in the context of the specific user, across the entire operating system, or both.
  • **User.** Evaluates the component for each user.
  • **System.** Evaluates the component only once for the system.
  • **UserAndSystem.** Evaluates the component for the entire operating system and each user.
| For example: -``` xml +```xml MigXmlHelper.DoesObjectExist("Registry","HKCU\Software\Adobe\Photoshop\8.0") @@ -1888,7 +850,7 @@ For example: and -``` xml +```xml @@ -1911,46 +873,23 @@ The <displayName> element is a required field within each <component> Syntax: -<displayName \_locID="*ID*">*ComponentName*</displayName> - - ----- - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

locID

No

This parameter is for internal USMT use. Do not use this parameter.

ComponentName

Yes

The name for the component.

- +```xml +ComponentName +``` +|Setting|Required?|Value| +|--- |--- |--- | +|locID|No|This parameter is for internal USMT use. Do not use this parameter.| +|*ComponentName*|Yes|The name for the component.| For example: -``` xml +```xml Command Prompt settings ``` ## <environment> - The <environment> element is a container for <variable> elements in which you can define variables to use in your .xml file. All environment variables defined this way will be private. That is, they will be available only for their child components and the component in which they were defined. For two example scenarios, see [Examples](#envex). - **Number of occurrences:** unlimited @@ -1963,55 +902,23 @@ The <environment> element is a container for <variable> elements in Syntax: -<environment name="ID" context="User|System|UserAndSystem"> - -</environment> - - ----- - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

name

Yes, when <environment> is a child of <namedElements>

-

No, when <environment> is a child of <role> or <component>

When declared as a child of the <role> or <component> elements, if ID is declared, USMT ignores the content of the <environment> element and the content of the <environment> element with the same name declared in the <namedElements> element is processed.

context

No

-

(default = UserAndSystem)

Defines the scope of this parameter: whether to process this component in the context of the specific user, across the entire operating system, or both.

-

The largest possible scope is set by the <component> element. For example, if a <component> element has a context of User and a <rules> element had a context of UserAndSystem, then the <rules> element would act as though it had a context of User. If the <rules> element had a context of System, it would act as though <rules> were not there.

-
    -
  • User. Evaluates the variables for each user.

  • -
  • System. Evaluates the variables only once for the system.

  • -
  • UserAndSystem. Evaluates the variables for the entire operating system and each user.

  • -
- +```xml + + +``` +|Setting|Required?|Value| +|--- |--- |--- | +| name | Yes, when <environment> is a child of <namedElements>
No, when <environment> is a child of <role> or <component> | When declared as a child of the <role> or <component> elements, if *ID* is declared, USMT ignores the content of the <environment> element and the content of the <environment> element with the same name declared in the <namedElements> element is processed. | +| context | No
(default = UserAndSystem) | Defines the scope of this parameter: whether to process this component in the context of the specific user, across the entire operating system, or both.
The largest possible scope is set by the <component> element. For example, if a <component> element has a context of User and a <rules> element had a context of UserAndSystem, then the <rules> element would act as though it had a context of User. If the <rules> element had a context of System, it would act as though <rules> were not there.
  • **User.** Evaluates the variables for each user.
  • **System.** Evaluates the variables only once for the system.
  • **UserAndSystem.** Evaluates the variables for the entire operating system and each user.
| ## - ### Example scenario 1 In this scenario, you want to generate the location of objects at run time depending on the configuration of the destination computer. For example, you must do this if an application writes data in the directory where it is installed, and users can install the application anywhere on the computer. If the application writes a registry value hklm\\software\\companyname\\install \[path\] and then updates this value with the location where the application is installed, then the only way for you to migrate the required data correctly is to define an environment variable. For example: -``` xml +```xml @@ -2021,7 +928,7 @@ In this scenario, you want to generate the location of objects at run time depen Then you can use an include rule as follows. You can use any of the [<script> functions](#scriptfunctions) to perform similar tasks. -``` xml +```xml %INSTALLPATH%\ [*.xyz] @@ -2031,7 +938,7 @@ Then you can use an include rule as follows. You can use any of the [<script& Second, you can also filter registry values that contain data that you need. The following example extracts the first string (before the separator ",") in the value of the registry Hklm\\software\\companyname\\application\\ \[Path\]. -``` xml +```xml @@ -2049,7 +956,7 @@ Second, you can also filter registry values that contain data that you need. The In this scenario, you want to migrate five files named File1.txt, File2.txt, and so on, from %SYSTEMDRIVE%\\data\\userdata\\dir1\\dir2\\. To do this you must have the following <include> rule in an .xml file: -``` xml +```xml %SYSTEMDRIVE%\data\userdata\dir1\dir2 [File1.txt] @@ -2063,7 +970,7 @@ In this scenario, you want to migrate five files named File1.txt, File2.txt, and Instead of typing the path five times, you can create a variable for the location as follows: -``` xml +```xml %SYSTEMDRIVE%\data\userdata\dir1\dir2 @@ -2073,7 +980,7 @@ Instead of typing the path five times, you can create a variable for the locatio Then, you can specify the variable in an <include> rule as follows: -``` xml +```xml %DATAPATH% [File1.txt] @@ -2100,39 +1007,19 @@ The <exclude> element determines what objects will not be migrated, unless Syntax: -<exclude filter="*ScriptInvocation*"> - -</exclude> - - ----- - - - - - - - - - - - - - - -
SettingRequired?Value

filter

No

-

(default = No)

A script followed by any number of string arguments that are separated by a comma and enclosed in parenthesis. For example, MyScripts.AScript ("Arg1","Arg2").

-

The script will be called for each object that is enumerated by the object sets in the include rule. The filter script returns a Boolean value. If the return value is TRUE, the object will be migrated. If it is FALSE, it will not be migrated.

+```xml + + +``` +|Setting|Required?|Value| +|--- |--- |--- | +|filter|No
(default = No)|A script followed by any number of string arguments that are separated by a comma and enclosed in parenthesis. For example, `MyScripts.AScript ("Arg1","Arg2")`.

The script will be called for each object that is enumerated by the object sets in the include rule. The filter script returns a Boolean value. If the return value is TRUE, the object will be migrated. If it is FALSE, it will not be migrated.| For example, from the MigUser.xml file: -``` xml +```xml %CSIDL_MYMUSIC%\* [*] @@ -2155,41 +1042,18 @@ You can use the <excludeAttributes> element to determine which parameters Syntax: -<excludeAttributes attributes="Security|TimeFields|Security,TimeFields"> - -</excludeAttributes> - - ----- - - - - - - - - - - - - - - -
ParameterRequired?Value

attributes

Yes

Specifies the attributes to be excluded. You can specify one of the following, or both separated by quotes; for example, "Security","TimeFields":

-
    -
  • Security can be one of Owner, Group, DACL, or SACL.

  • -
  • TimeFields can be one of CreationTime, LastAccessTime and LastWrittenTime

  • -
- +```xml + + +``` +|Setting|Required?|Value| +|--- |--- |--- | +| attributes | Yes | Specifies the attributes to be excluded. You can specify one of the following, or both separated by quotes; for example, `"Security","TimeFields"`:
  • Security can be one of Owner, Group, DACL, or SACL.
  • TimeFields can be one of CreationTime, LastAccessTime and LastWrittenTime
| Example: -``` xml +```xml @@ -2251,9 +1115,10 @@ The <extensions> element is a container for one or more <extension> Syntax: -<extensions> - -</extensions> +```xml + + +``` ## <extension> @@ -2268,35 +1133,17 @@ You can use the <extension> element to specify documents of a specific ext Syntax: -<extension>*FilenameExtension*</extension> - - ----- - - - - - - - - - - - - - - -
SettingRequired?Value

FilenameExtension

Yes

A file name extension.

- +```xml +FilenameExtension +``` +|Setting|Required?|Value| +|--- |--- |--- | +|*FilenameExtension*|Yes|A file name extension.| For example, if you want to migrate all \*.doc files from the source computer, specifying the following code under the <component> element: -``` xml +```xml doc @@ -2304,7 +1151,7 @@ For example, if you want to migrate all \*.doc files from the source computer, s is the same as specifying the following code below the <rules> element: -``` xml +```xml @@ -2327,52 +1174,23 @@ You can use the <externalProcess> element to run a command line during the Syntax: -<externalProcess when="pre-scan|scan-success|post-scan|pre-apply|apply-success|post-apply"> - -</externalProcess> - - ----- - - - - - - - - - - - - - - -
SettingRequired?Value

when

Yes

Indicates when the command line should be run. This value can be one of the following:

-
    -
  • pre-scan before the scanning process begins.

  • -
  • scan-success after the scanning process has finished successfully.

  • -
  • post-scan after the scanning process has finished, whether it was successful or not.

  • -
  • pre-apply before the apply process begins.

  • -
  • apply-success after the apply process has finished successfully.

  • -
  • post-apply after the apply process has finished, whether it was successful or not.

  • -
- +```xml + + +``` +|Setting|Required?|Value| +|--- |--- |--- | +| when | Yes | Indicates when the command line should be run. This value can be one of the following:
  • **pre-scan** before the scanning process begins.
  • **scan-success** after the scanning process has finished successfully.
  • **post-scan** after the scanning process has finished, whether it was successful or not.
  • **pre-apply** before the apply process begins.
  • **apply-success** after the apply process has finished successfully.
  • **post-apply** after the apply process has finished, whether it was successful or not.
| For an example of how to use the <externalProcess> element, see the example for [<excludeAttributes>](#excludeattributes). ## <icon> - This is an internal USMT element. Do not use this element. ## <include> - The <include> element determines what to migrate, unless there is a more specific [<exclude>](#exclude) rule. You can specify a script to be more specific to extend the definition of what you want to collect. For each <include> element there can be multiple <objectSet> elements. - **Number of occurrences:** Unlimited @@ -2385,39 +1203,18 @@ The <include> element determines what to migrate, unless there is a more s Syntax: -<include filter="*ScriptInvocation*"> - -</include> - - ----- - - - - - - - - - - - - - - -
SettingRequired?Value

filter

No.

-

If this parameter is not specified, then all patterns that are inside the child <ObjectSet> element will be processed.

A script followed by any number of string arguments that are separated by a comma and enclosed in parenthesis. For example, MyScripts.AScript ("Arg1","Arg2").

-

The script will be called for each object that is enumerated by the object sets in the <include> rule. The filter script returns a Boolean value. If the return value is TRUE, the object will be migrated. If it is FALSE, it will not be migrated.

- +```xml + + +``` +|Setting|Required?|Value| +|--- |--- |--- | +| filter | No.
If this parameter is not specified, then all patterns that are inside the child <ObjectSet> element will be processed. | A script followed by any number of string arguments that are separated by a comma and enclosed in parenthesis. For example, `MyScripts.AScript ("Arg1","Arg2")`.
The script will be called for each object that is enumerated by the object sets in the <include> rule. The filter script returns a Boolean value. If the return value is TRUE, the object will be migrated. If it is FALSE, it will not be migrated. | The following example is from the MigUser.xml file: -``` xml +```xml My Video @@ -2453,54 +1250,26 @@ The following functions return a Boolean value. You can use them to migrate cert This filter always returns FALSE. - Syntax: AnswerNo () + Syntax: `AnswerNo ()` - **CompareStringContent** - Syntax: CompareStringContent("*StringContent*","*CompareType*") - - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

StringContent

Yes

The string to check against.

CompareType

Yes

A string. Use one of the following values:

-
    -
  • Equal (case insensitive). The function returns TRUE if the string representation of the current object that is processed by the migration engine is identical to StringContent.

  • -
  • NULL or any other value. The function returns TRUE if the string representation of the current object that is processed by the migration engine does not match StringContent.

  • -
- + Syntax: `CompareStringContent("StringContent","CompareType")` + |Setting|Required?|Value| + |--- |--- |--- | + | *StringContent* | Yes | The string to check against. | + | *CompareType* | Yes | A string. Use one of the following values:
  • **Equal** (case insensitive). The function returns TRUE if the string representation of the current object that is processed by the migration engine is identical to `StringContent`.
  • **NULL** **or any other value**. The function returns TRUE if the string representation of the current object that is processed by the migration engine does not match `StringContent`.
| - **IgnoreIrrelevantLinks** This filter screens out the .lnk files that point to an object that is not valid on the destination computer. Note that the screening takes place on the destination computer, so all .lnk files will be saved to the store during ScanState. Then they will be screened out when you run the LoadState tool. - Syntax: IgnoreIrrelevantLinks () + Syntax: `IgnoreIrrelevantLinks ()` For example: - ``` xml + ```xml %CSIDL_COMMON_VIDEO%\* [*] @@ -2512,11 +1281,11 @@ The following functions return a Boolean value. You can use them to migrate cert You can use this function to collect the specified objects from the source computer but then not migrate the objects to the destination computer. When run with the ScanState tool, this function evaluates to TRUE. When run with the LoadState tool, this function evaluates to FALSE. You may want to use this function when you want to check an object's value on the destination computer but do not intend to migrate the object to the destination. - Syntax: NeverRestore() + Syntax: `NeverRestore()` In the following example, HKCU\\Control Panel\\International \[Locale\] will be included in the store, but it will not be migrated to the destination computer: - ``` xml + ```xml HKCU\Control Panel\International [Locale] @@ -2537,59 +1306,23 @@ You can use the <includeAttributes> element to determine whether certain p Syntax: -<includeAttributes attributes="Security|TimeFields|Security,TimeFields"> - -</includeAttributes> - - ----- - - - - - - - - - - - - - - -
SettingRequired?Value

attributes

Yes

Specifies the attributes to be included with a migrated object. You can specify one of the following, or both separated by quotes; for example, "Security","TimeFields":

-
    -
  • Security can be one of the following values:

    -
      -
    • Owner. The owner of the object (SID).

    • -
    • Group. The primary group for the object (SID).

    • -
    • DACL (discretionary access control list). An access control list that is controlled by the owner of an object and that specifies the access particular users or groups can have to the object.

    • -
    • SACL (system access control list). An ACL that controls the generation of audit messages for attempts to access a securable object. The ability to get or set an object's SACL is controlled by a privilege typically held only by system administrators.

    • -
  • -
  • TimeFields can be one of the following:

    -
      -
    • CreationTime. Specifies when the file or directory was created.

    • -
    • LastAccessTime. Specifies when the file is last read from, written to, or, in the case of executable files, run.

    • -
    • LastWrittenTime. Specifies when the file is last written to, truncated, or overwritten.

    • -
  • -
- +```xml + + +``` +|Setting|Required?|Value| +|--- |--- |--- | +| attributes | Yes | Specifies the attributes to be included with a migrated object. You can specify one of the following, or both separated by quotes; for example, `"Security","TimeFields"`:
  • Security can be one of the following values:
    • **Owner.** The owner of the object (SID).
    • **Group.** The primary group for the object (SID).
    • **DACL** (discretionary access control list). An access control list that is controlled by the owner of an object and that specifies the access particular users or groups can have to the object.
    • **SACL** (system access control list). An ACL that controls the generation of audit messages for attempts to access a securable object. The ability to get or set an object's SACL is controlled by a privilege typically held only by system administrators.
  • TimeFields can be one of the following:
    • **CreationTime.** Specifies when the file or directory was created.
    • **LastAccessTime.** Specifies when the file is last read from, written to, or, in the case of executable files, run.
    • **LastWrittenTime.** Specifies when the file is last written to, truncated, or overwritten.
| For an example of how to use the <includeAttributes> element, see the example for [<excludeAttributes>](#excludeattributes). ## <library> - This is an internal USMT element. Do not use this element. ## <location> - The <location> element defines the location of the <object> element. - **Number of occurrences:** once for each <object> @@ -2600,40 +1333,18 @@ The <location> element defines the location of the <object> element. Syntax: -<location type="*typeID*">*ObjectLocation*</location> - - ----- - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

type

Yes

typeID can be Registry or File.

ObjectLocation

Yes

The location of the object.

- +```xml +ObjectLocation +``` +|Setting|Required?|Value| +|--- |--- |--- | +|type|Yes|*typeID* can be Registry or File.| +|*ObjectLocation*|Yes|The location of the object.| The following example is from the MigApp.xml file: -``` xml +```xml %HklmWowSoftware%\Microsoft\Office\12.0\Common\Migration\Office [UpgradeVersion] @@ -2650,7 +1361,6 @@ The following example is from the MigApp.xml file: ## <locationModify> - You can use the <locationModify> element to change the location and name of an object before it is migrated to the destination computer. The <locationModify> element is processed only when the LoadState tool is run on the destination computer. In other words, this element is ignored by the ScanState tool. The <locationModify> element will create the appropriate folder on the destination computer if it does not already exist. **Number of occurrences:** Unlimited @@ -2663,38 +1373,18 @@ You can use the <locationModify> element to change the location and name o Syntax: -<locationModify script="*ScriptInvocation*"> - -</locationModify> - - ----- - - - - - - - - - - - - - - -
SettingRequired?Value

script

Yes

A script followed by any number of string arguments that are separated by a comma and enclosed in parenthesis. For example, MyScripts.AScript ("Arg1","Arg2").

-

The script will be called for each object that is enumerated by the object sets in the include rule. The filter script returns a Boolean value. If the return value is TRUE, the object will be migrated. If it is FALSE, it will not be migrated.

- +```xml + + +``` +|Setting|Required?|Value| +|--- |--- |--- | +|script|Yes|A script followed by any number of string arguments that are separated by a comma and enclosed in parenthesis. For example, `MyScripts.AScript ("Arg1","Arg2")`.

The script will be called for each object that is enumerated by the object sets in the include rule. The filter script returns a Boolean value. If the return value is TRUE, the object will be migrated. If it is FALSE, it will not be migrated.| The following example is from the MigApp.xml file: -``` xml +```xml %CSIDL_APPDATA%\Microsoft\Office\ [Access10.pip] @@ -2710,113 +1400,46 @@ The following functions change the location of objects as they are migrated when The ExactMove function moves all of the objects that are matched by the parent <ObjectSet> element into the given *ObjectEncodedLocation*. You can use this function when you want to move a single file to a different location on the destination computer. If the destination location is a node, all of the matching source objects will be written to the node without any subdirectories. If the destination location is a leaf, the migration engine will migrate all of the matching source objects to the same location. If a collision occurs, the normal collision algorithms will apply. - Syntax: ExactMove(*ObjectEncodedLocation*) + Syntax: `ExactMove(ObjectEncodedLocation)` - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

ObjectEncodedLocation

Yes

The destination location for all of the source objects.

+ |Setting|Required?|Value| + |--- |--- |--- | + |*ObjectEncodedLocation*|Yes|The destination [location](#locations) for all of the source objects.| + For example: - -~~~ -For example: - -``` xml - + ```xml + HKCU\Keyboard Layout\Toggle [] - -``` -~~~ + + ``` - **Move** The Move function moves objects to a different location on the destination computer. In addition, this function creates subdirectories that were above the longest CSIDL in the source object name. - Syntax: Move(*DestinationRoot*) - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

DestinationRoot

Yes

The location where the source objects will be moved. If needed, this function will create any subdirectories that were above the longest CSIDL in the source object name.

- + Syntax: `Move(DestinationRoot)` + |Setting|Required?|Value| + |--- |--- |--- | + |*DestinationRoot*|Yes|The location where the source objects will be moved. If needed, this function will create any subdirectories that were above the longest CSIDL in the source object name.| - **RelativeMove** You can use the RelativeMove function to collect and move data. Note that you can use environment variables in source and destination roots, but they may be defined differently on the source and destination computers. - Syntax: RelativeMove(*SourceRoot*,*DestinationRoot*) + Syntax: `RelativeMove(SourceRoot,DestinationRoot)` - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

SourceRoot

Yes

The location from where the objects will be moved. Any source objects that are enumerated by the parent <ObjectSet> element that are not in this location will not be moved.

DestinationRoot

Yes

The location where the source objects will be moved to on the destination computer. If needed, this function will create any subdirectories that were above SourceRoot.

+ |Setting|Required?|Value| + |--- |--- |--- | + |*SourceRoot*|Yes|The location from where the objects will be moved. Any source objects that are enumerated by the parent <ObjectSet> element that are not in this location will not be moved.| + |*DestinationRoot*|Yes|The location where the source objects will be moved to on the destination computer. If needed, this function will create any subdirectories that were above *SourceRoot*.| - - -~~~ For example: -``` xml +```xml %CSIDL_COMMON_FAVORITES%\* [*] @@ -2828,7 +1451,6 @@ For example:
``` -~~~ ## <\_locDefinition> @@ -2848,35 +1470,16 @@ The <manufacturer> element defines the manufacturer for the component, but Syntax: -<manufacturer>*Name*</manufacturer> - - ----- - - - - - - - - - - - - - - -
SettingRequired?Value

Name

Yes

The name of the manufacturer for the component.

- +```xml +Name +``` +|Setting|Required?|Value| +|--- |--- |--- | +|*Name*|Yes|The name of the manufacturer for the component.| ## <merge> - The <merge> element determines what will happen when a collision occurs. A collision is when an object that is migrated is already present on the destination computer. If you do not specify this element, the default behavior for the registry is for the source object to overwrite the destination object. The default behavior for files is for the source file to be renamed to "OriginalFileName(1).OriginalExtension". This element specifies only what should be done when a collision occurs. It does not include objects. Therefore, for your objects to migrate, you must specify <include> rules along with the <merge> element. When an object is processed and a collision is detected, USMT will select the most specific merge rule and apply it to resolve the conflict. For example, if you have a <merge> rule C:\\\* \[\*\] set to <sourcePriority> and a <merge> rule C:\\subfolder\\\* \[\*\] set to <destinationPriority>, then USMT would use the <destinationPriority> rule because it is the more specific. For an example of this element, see [Conflicts and Precedence](usmt-conflicts-and-precedence.md). @@ -2891,38 +1494,18 @@ For an example of this element, see [Conflicts and Precedence](usmt-conflicts-an Syntax: -<merge script="*ScriptInvocation*"> - -</merge> - - ----- - - - - - - - - - - - - - - -
SettingRequired?Value

script

Yes

A script followed by any number of string arguments that are separated by a comma and enclosed in parenthesis. For example, MyScripts.AScript ("Arg1","Arg2").

-

The script will be called for each object that is enumerated by the object sets in the <include> rule. The filter script returns a Boolean value. If the return value is TRUE, the object will be migrated. If it is FALSE, it will not be migrated.

- +```xml + + +``` +|Setting|Required?|Value| +|--- |--- |--- | +|script|Yes|A script followed by any number of string arguments that are separated by a comma and enclosed in parenthesis. For example, `MyScripts.AScript ("Arg1","Arg2")`.

The script will be called for each object that is enumerated by the object sets in the <include> rule. The filter script returns a Boolean value. If the return value is TRUE, the object will be migrated. If it is FALSE, it will not be migrated.| The following example is from the MigUser.xml file: -``` xml +```xml @@ -2947,7 +1530,7 @@ These functions control how collisions are resolved. For example: - ``` xml + ```xml HKCU\Software\Microsoft\Office\9.0\PhotoDraw\ [MyPictures] @@ -2961,66 +1544,21 @@ These functions control how collisions are resolved. The FindFilePlaceByPattern function saves files with an incrementing counter when a collision occurs. It is a string that contains one of each constructs: <F>, <E>, <N> in any order. - Syntax: FindFilePlaceByPattern(*FilePattern*) - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

FilePattern

Yes

    -
  • <F> will be replaced by the original file name.

  • -
  • <N> will be replaced by an incrementing counter until there is no collision with the objects on the destination computer.

  • -
  • <E> will be replaced by the original file name extension.

  • -
-

For example, <F> (<N>).<E> will change the source file MyDocument.doc into MyDocument (1).doc on the destination computer.

- + Syntax: `FindFilePlaceByPattern(FilePattern)` + |Setting|Required?|Value| + |--- |--- |--- | + | *FilePattern* | Yes |
  • **<F>** will be replaced by the original file name.
  • **<N>** will be replaced by an incrementing counter until there is no collision with the objects on the destination computer.
  • **<E>** will be replaced by the original file name extension.

For example, ` ().` will change the source file MyDocument.doc into MyDocument (1).doc on the destination computer. | - **NewestVersion** The NewestVersion function will resolve conflicts on the destination computer based on the version of the file. - Syntax: NewestVersion(*VersionTag*) - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

VersionTag

Yes

The version field that will be checked. This can be "FileVersion" or "ProductVersion". The file with the highest VersionTag version determines which conflicts will be resolved based on the file's version. For example, if Myfile.txt contains FileVersion 1 and the same file on the destination computer contains FileVersion 2, the file on destination will remain.

- + Syntax: `NewestVersion(VersionTag)` + |Setting|Required?|Value| + |--- |--- |--- | + |*VersionTag*|Yes|The version field that will be checked. This can be "FileVersion" or "ProductVersion". The file with the highest *VersionTag* version determines which conflicts will be resolved based on the file's version. For example, if Myfile.txt contains FileVersion 1 and the same file on the destination computer contains FileVersion 2, the file on destination will remain.| - **HigherValue()** @@ -3036,7 +1574,7 @@ These functions control how collisions are resolved. For example: - ``` xml + ```xml %HklmWowSoftware%\Microsoft\Office\12.0\Common\Migration\Publisher [UpgradeVersion] @@ -3048,7 +1586,6 @@ These functions control how collisions are resolved. ## <migration> - The <migration> element is the single root element of a migration .xml file and is required. Each .xml file must have a unique migration urlid. The urlid of each file that you specify on the command line must be unique. This is because USMT uses the urlid to define the components within the file. For example, you must specify the following at the beginning of each file: <CustomFileName> is the name of the file; for example, "CustomApp". - **Number of occurrences:** one @@ -3061,83 +1598,34 @@ The <migration> element is the single root element of a migration .xml fil Syntax: -<migration urlid="UrlID/Name"> - -</migration> - - ----- - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

urlid

Yes

UrlID is a string identifier that uniquely identifies this .xml file. This parameter must be a no-colon-name as defined by the XML Namespaces specification. Each migration .xml file must have a unique urlid. If two migration .xml files have the same urlid, the second .xml file that is specified on the command line will not be processed. For more information about XML Namespaces, see Use XML Namespaces.

Name

No

Although not required, it is good practice to use the name of the .xml file.

- +```xml + + +``` +|Setting|Required?|Value| +|--- |--- |--- | +|urlid|Yes|*UrlID* is a string identifier that uniquely identifies this .xml file. This parameter must be a no-colon-name as defined by the XML Namespaces specification. Each migration .xml file must have a unique urlid. If two migration .xml files have the same urlid, the second .xml file that is specified on the command line will not be processed. For more information about XML Namespaces, see [Use XML Namespaces](/previous-versions/windows/desktop/ms754539(v=vs.85)).| +|Name|No|Although not required, it is good practice to use the name of the .xml file.| The following example is from the MigApp.xml file: -``` xml +```xml ``` ## MigXMLHelper.FileProperties - This filter helper function can be used to filter the migration of files based on file size and date attributes. - ---- - - - - - - - - - - - - - - - - - - - - -
Helper FunctionMigXMLHelper.FileProperties (property, operator, valueToCompare)

Property

filesize, dateCreated, dateModified, dateAccessed

Operator

range, neq, lte, lt, eq, gte, gt

valueToCompare

The value we are comparing. For example:

-

Date: "2008/05/15-2005/05/17", "2008/05/15"

-

Size: A numeral with B, KB, MB, or GB at the end. "5GB", "1KB-1MB"

+|Helper Function|MigXMLHelper.FileProperties (property, operator, valueToCompare)| +|--- |--- | +|Property|filesize, dateCreated, dateModified, dateAccessed| +|Operator|range, neq, lte, lt, eq, gte, gt| +|valueToCompare|The value we are comparing. For example:
Date: "2008/05/15-2005/05/17", "2008/05/15"
Size: A numeral with B, KB, MB, or GB at the end. "5GB", "1KB-1MB"| - - -``` xml +```xml File_size @@ -3155,14 +1643,14 @@ This filter helper function can be used to filter the migration of files based o ## <namedElements> - You can use the **<namedElements>** element to define named elements. You can use these elements in any component throughout your .xml file. For an example of how to use this element, see the MigApp.xml file. Syntax: -<namedElements> - -</namedElements> +```xml + + +``` - **Number of occurrences:** Unlimited @@ -3174,7 +1662,6 @@ For an example of this element, see the MigApp.xml file. ## <object> - The <object> element represents a file or registry key. - **Number of occurrences:** Unlimited @@ -3187,13 +1674,14 @@ The <object> element represents a file or registry key. Syntax: -<object> - -</object> +```xml + + +``` The following example is from the MigApp.xml file: -``` xml +```xml %HklmWowSoftware%\Microsoft\Office\12.0\Common\Migration\Office [UpgradeVersion] @@ -3223,13 +1711,14 @@ The <objectSet> element contains a list of object patterns ; for example, Syntax: -<objectSet> - -</objectSet> +```xml + + +``` The following example is from the MigUser.xml file: -``` xml +```xml My Music @@ -3272,7 +1761,7 @@ This is an internal USMT element. Do not use this element. You can use this element to specify multiple objects. You can specify multiple <pattern> elements for each <objectSet> element and they will be combined. If you are specifying files, you may want to use GenerateDrivePatterns with <script> instead. GenerateDrivePatterns is basically the same as a <pattern> rule, without the drive letter specification. For example, the following two lines of code are similar: -``` xml +```xml C:\Folder\* [Sample.doc] ``` @@ -3285,63 +1774,26 @@ You can use this element to specify multiple objects. You can specify multiple & Syntax: -<pattern type="*typeID*">*Path* \[*object*\]</pattern> - - ----- - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

type

Yes

typeID can be Registry, File, or Ini. If typeId is Ini, then you cannot have a space between Path and object. For example, the following is correct when type="Ini":

-

<pattern type="Ini">%WinAmp5InstPath%\Winamp.ini|WinAmp[keeponscreen]</pattern>

Path [object]

Yes

A valid registry or file path pattern, followed by at least one space, followed by brackets [] that contain the object to be migrated.

-
    -
  • Path can contain the asterisk () wildcard character or can be an Recognized Environment Variables. You cannot use the question mark as a wildcard character.You can use HKCU and HKLM to refer to HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE respectively.

  • -
  • Object can contain the asterisk () wildcard character. However, you cannot use the question mark as a wildcard character. For example:

    -

    C:\Folder\ [] enumerates all files in C:<em>Path but no subfolders of C:\Folder.

    -

    C:\Folder* [] enumerates all files and subfolders of C:\Folder.

    -

    C:\Folder\ [*.mp3] enumerates all .mp3 files in C:\Folder.

    -

    C:\Folder\ [Sample.doc] enumerates only the Sample.doc file located in C:\Folder.

    -
    -Note

    If you are migrating a file that has a square bracket character ([ or ]) in the file name, you must insert the carrot (^) character directly before the bracket for it to be valid. For example, if there is a file named "file].txt", you must specify <pattern type="File">c:\documents\mydocs [file^].txt]</pattern> instead of <pattern type="File">c:\documents\mydocs [file].txt]</pattern>.

    -
    -
    - -
  • -
- +```xml +Path [object] +``` +|Setting|Required?|Value| +|--- |--- |--- | +| type | Yes | *typeID* can be Registry, File, or Ini. If *typeId* is Ini, then you cannot have a space between *Path* and *object*. For example, the following is correct when type="Ini":
**<pattern type="Ini">%WinAmp5InstPath%\Winamp.ini|WinAmp[keeponscreen]</pattern>** | +| *Path* [*object*] | Yes | A valid registry or file path pattern, followed by at least one space, followed by brackets [] that contain the object to be migrated.
  • *Path* can contain the asterisk (*) wildcard character or can be an [Recognized Environment Variables](usmt-recognized-environment-variables.md). You cannot use the question mark as a wildcard character.You can use HKCU and HKLM to refer to HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE respectively.
  • *Object* can contain the asterisk () wildcard character. However, you cannot use the question mark as a wildcard character. For example:
    **`C:\Folder\ [*]`** enumerates all files in C:<em>Path* but no subfolders of C:\Folder.
    **`C:\Folder* [*]`** enumerates all files and subfolders of C:\Folder.
    **`C:\Folder\ [*.mp3]`** enumerates all .mp3 files in C:\Folder.
    **`C:\Folder\ [Sample.doc]`** enumerates only the Sample.doc file located in C:\Folder.
    **Note**
    If you are migrating a file that has a square bracket character ([ or ]) in the file name, you must insert the carrot (^) character directly before the bracket for it to be valid. For example, if there is a file named "file].txt", you must specify `c:\documents\mydocs [file^].txt]` instead of `c:\documents\mydocs [file].txt]`.
| For example: - To migrate a single registry key: - ``` xml + ```xml HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache [Persistent] ``` - To migrate the EngineeringDrafts folder and any subfolders from the C: drive: - ``` xml + ```xml C:\EngineeringDrafts\* [*] ``` @@ -3351,13 +1803,13 @@ For example: - To migrate the Sample.doc file from C:\\EngineeringDrafts: - ``` xml + ```xml C:\EngineeringDrafts\ [Sample.doc] ``` - To migrate the Sample.doc file from where ever it exists on the C: drive use pattern in the following way. If multiple files exist with the same name on the C: drive, then all of these files will be migrated. - ``` xml + ```xml C:\* [Sample.doc] ``` @@ -3365,7 +1817,6 @@ For example: ## <processing> - You can use this element to run a script during a specific point within the migration process. Return values are not expected from the scripts that you specify, and if there are return values, they will be ignored. - **Number of occurrences:** unlimited @@ -3376,50 +1827,21 @@ You can use this element to run a script during a specific point within the migr Syntax: -<processing when="pre-scan|scan-success|post-scan|pre-apply|apply-success|post-apply"> - -</processing> - - ----- - - - - - - - - - - - - - - -
SettingRequired?Value

when

Yes

Indicates when the script should be run. This value can be one of the following:

-
    -
  • pre-scan means before the scanning process begins.

  • -
  • scan-success means after the scanning process has finished successfully.

  • -
  • post-scan means after the scanning process has finished, whether it was successful or not.

  • -
  • pre-apply means before the apply process begins.

  • -
  • apply-success means after the apply process has finished successfully.

  • -
  • post-apply means after the apply process has finished, whether it was successful or not.

  • -
- +```xml + + +``` +|Setting|Required?|Value| +|--- |--- |--- | +| when | Yes | Indicates when the script should be run. This value can be one of the following:
  • **pre-scan** means before the scanning process begins.
  • **scan-success** means after the scanning process has finished successfully.
  • **post-scan** means after the scanning process has finished, whether it was successful or not.
  • **pre-apply** means before the apply process begins.
  • **apply-success** means after the apply process has finished successfully.
  • **post-apply** means after the apply process has finished, whether it was successful or not.
| ## <plugin> - This is an internal USMT element. Do not use this element. ## <role> - The <role> element is required in a custom .xml file. By specifying the <role> element, you can create a concrete component. The component will be defined by the parameters specified at the <component> level, and with the role that you specify here. - **Number of occurrences:** Each <component> can have one, two or three child <role> elements. @@ -3432,58 +1854,18 @@ The <role> element is required in a custom .xml file. By specifying the &l Syntax: -<role role="Container|Binaries|Settings|Data"> - -</role> - - ----- - - - - - - - - - - - - - - -
SettingRequired?Value

role

Yes

Defines the role for the component. Role can be one of:

-
    -
  • Container

  • -
  • Binaries

  • -
  • Settings

  • -
  • Data

  • -
-

You can either:

-
    -
  1. Specify up to three <role> elements within a <component> — one "Binaries" role element, one "Settings" role element and one "Data" role element. These parameters do not change the migration behavior — their only purpose is to help you categorize the settings that you are migrating. You can nest these <role> elements, but each nested element must be of the same role parameter.

  2. -
  3. Specify one "Container" <role> element within a <component> element. In this case, you cannot specify any child <rules> elements, only other <component> elements. And each child <component> element must have the same type as that of parent <component> element. For example:

  4. -
-
<component context="UserAndSystem" type="Application">
-  <displayName _locID="migapp.msoffice2003">Microsoft Office 2003</displayName> 
-  <environment name="GlobalEnv" /> 
-  <role role="Container">
-    <detection name="AnyOffice2003Version" /> 
-    <detection name="FrontPage2003" /> 
-    <!-- 
- Office 2003 Common Settings 
-  --> 
-    <component context="UserAndSystem" type="Application">
- +```xml + + +``` +|Setting|Required?|Value| +|--- |--- |--- | +| role | Yes | Defines the role for the component. Role can be one of:
  • **Container**
  • **Binaries**
  • **Settings**
  • **Data**
You can either:
  1. Specify up to three <role> elements within a <component> — one "Binaries" role element, one "Settings" role element and one "Data" role element. These parameters do not change the migration behavior — their only purpose is to help you categorize the settings that you are migrating. You can nest these <role> elements, but each nested element must be of the same role parameter.
  2. Specify one "Container" <role> element within a <component> element. In this case, you cannot specify any child <rules> elements, only other <component> elements. And each child <component> element must have the same type as that of parent <component> element. For example:
<component context="UserAndSystem" type="Application"> 
<displayName _locID="migapp.msoffice2003">Microsoft Office 2003</displayName>
<environment name="GlobalEnv" />
<role role="Container">
<detection name="AnyOffice2003Version" />
<detection name="FrontPage2003" />
<!--
Office 2003 Common Settings
-->
<component context="UserAndSystem" type="Application">
| The following example is from the MigUser.xml file. For more examples, see the MigApp.xml file: -``` xml +```xml Start Menu @@ -3527,50 +1909,19 @@ The <rules> element is required in a custom .xml file. This element contai Syntax: -<rules name="*ID*" context="User|System|UserAndSystem"> - -</rules> - - ----- - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

name

Yes, when <rules> is a child to <namedElements>

-

No, when <rules> is a child to any other element

When ID is specified, any child elements are not processed. Instead, any other <rules> elements with the same name that are declared within <namedElements> are processed.

context

No

-

(default = UserAndSystem)

Defines the scope of this parameter — whether to process this component in the context of the specific user, across the entire operating system, or both.

-

The largest possible scope is set by the component element. For example, if a <component> element has a context of User and a <rules> element had a context of UserAndSystem, then the <rules> element would act as though it has a context of User. If <rules> had a context of System, it would act as though <rules> was not there.

-
    -
  • User. Evaluates the variables for each user.

  • -
  • System. Evaluates the variables only once for the system.

  • -
  • UserAndSystem. Evaluates the variables for the entire operating system and each user.

  • -
- +```xml + + +``` +|Setting|Required?|Value| +|--- |--- |--- | +| name | Yes, when <rules> is a child to <namedElements>
No, when <rules> is a child to any other element | When *ID* is specified, any child elements are not processed. Instead, any other <rules> elements with the same name that are declared within <namedElements> are processed. | +| context | No
(default = UserAndSystem) | Defines the scope of this parameter — whether to process this component in the context of the specific user, across the entire operating system, or both.
The largest possible scope is set by the component element. For example, if a <component> element has a context of User and a <rules> element had a context of UserAndSystem, then the <rules> element would act as though it has a context of User. If <rules> had a context of System, it would act as though <rules> was not there.
  • **User.** Evaluates the variables for each user.
  • **System.** Evaluates the variables only once for the system.
  • **UserAndSystem.** Evaluates the variables for the entire operating system and each user.
| The following example is from the MigUser.xml file: -``` xml +```xml My Music @@ -3611,74 +1962,41 @@ The return value that is required by <script> depends on the parent elemen **Syntax and helper functions:** -- General Syntax: <script>*ScriptWithArguments*</script> +- General Syntax: `` - You can use [GetStringContent](#scriptfunctions) when <script> is within <variable>. - Syntax: <script>MigXmlHelper.GetStringContent("*ObjectType*","*EncodedLocationPattern*", "*ExpandContent*")</script> + Syntax: `` Example: `` - You can use [GenerateUserPatterns](#scriptfunctions) when <script> is within <objectSet>. - Syntax: <script>MigXmlHelper.GenerateUserPatterns("*ObjectType*","*EncodedLocationPattern*","*ProcessCurrentUser*")</script> + Syntax: `` Example: `` - You can use [GenerateDrivePatterns](#scriptfunctions) when <script> is within <objectSet>. - Syntax: <script>MigXmlHelper.GenerateDrivePatterns("*PatternSegment*","*DriveType*")</script> + Syntax: `` Example: `` - You can use the [Simple executing scripts](#scriptfunctions) with <script> elements that are within <processing> elements: AskForLogoff, ConvertToShortFileName, KillExplorer, RemoveEmptyDirectories, RestartExplorer, RegisterFonts, StartService, StopService, SyncSCM. - Syntax: <script>MigXmlHelper.*ExecutingScript*</script> + Syntax: `` Example: `` - ----- - - - - - - - - - - - - - - -
SettingRequired?Value

ScriptWithArguments

Yes

A script followed by any number of string arguments that are separated by a comma and enclosed in parenthesis. For example, MyScripts.AScript ("Arg1","Arg2").

-

The script will be called for each object that is enumerated by the object sets in the <include> rule. The filter script returns a Boolean value. If the return value is TRUE, the object will be migrated. If it is FALSE, it will not be migrated.

-

The return value that is required by <script> depends on the parent element.

-
    -
  • When used within <variable>, the return value must be a string.

  • -
  • When used within <objectSet>, the return value must be a two-dimensional array of strings.

  • -
  • When used within <location>, the return value must be a valid location that aligns with the type attribute of <location>. For example, if <location type="File">, the child script element, if specified, must be a valid file location.

    -
    -Note

    If you are migrating a file that has a bracket character ([ or ]) in the file name, insert the carrot (^) character directly before the bracket for it to be valid. For example, if there is a file named "file].txt", specify <pattern type="File">c:\documents\mydocs [file^].txt]</pattern> instead of <pattern type="File">c:\documents\mydocs [file].txt]</pattern>.

    -
    -
    - -
  • -
- - +|Setting|Required?|Value| +|--- |--- |--- | +| *ScriptWithArguments* | Yes | A script followed by any number of string arguments that are separated by a comma and enclosed in parenthesis. For example, `MyScripts.AScript ("Arg1","Arg2")`.
The script will be called for each object that is enumerated by the object sets in the <include> rule. The filter script returns a Boolean value. If the return value is TRUE, the object will be migrated. If it is FALSE, it will not be migrated.
The return value that is required by <script> depends on the parent element.
  • When used within <variable>, the return value must be a string.
  • When used within <objectSet>, the return value must be a two-dimensional array of strings.
  • When used within <location>, the return value must be a valid location that aligns with the type attribute of <location>. For example, if <location type="File">, the child script element, if specified, must be a valid file location.
    **Note**
    If you are migrating a file that has a bracket character ([ or ]) in the file name, insert the carrot (^) character directly before the bracket for it to be valid. For example, if there is a file named "file].txt", specify `c:\documents\mydocs [file^].txt]` instead of `c:\documents\mydocs [file].txt]`.
| Examples: To migrate the Sample.doc file from any drive on the source computer, use <script> as follows. If multiple files exist with the same name, all such files will get migrated. -``` xml +```xml ``` @@ -3700,100 +2018,34 @@ These functions return either a string or a pattern. You can use GetStringContent with <script> elements that are within <variable> elements. If possible, this function returns the string representation of the given object. Otherwise, it returns NULL. For file objects this function always returns NULL. - Syntax: GetStringContent("*ObjectType*","*EncodedLocationPattern*", "*ExpandContent*") + Syntax: `GetStringContent("ObjectType","EncodedLocationPattern", "ExpandContent")` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

ObjectType

Yes

The type of object. Can be Registry or Ini (for an .ini file).

EncodedLocationPattern

Yes

    -
  • If type of object is Registry, EncodedLocationPattern must be a valid registry path. For example, HKLM\SOFTWARE\MyKey[].

  • -
  • If the type of object is Ini, then EncodedLocationPattern must be in the following format:

    -

    IniFilePath|SectionName[SettingName]

  • -

ExpandContent

No (default=TRUE)

Can be TRUE or FALSE. If FALSE, then the given location will not be expanded before it is returned.

+ |Setting|Required?|Value| + |--- |--- |--- | + | *ObjectType* | Yes | The type of object. Can be Registry or Ini (for an .ini file). | + | *EncodedLocationPattern* | Yes |
  • If type of object is Registry, EncodedLocationPattern must be a valid registry path. For example, HKLM\SOFTWARE\MyKey[].
  • If the type of object is Ini, then EncodedLocationPattern must be in the following format:
    IniFilePath|SectionName[SettingName]
| + | *ExpandContent* | No (default=TRUE) | Can be TRUE or FALSE. If FALSE, then the given location will not be expanded before it is returned. | + For example: - -~~~ -For example: - -``` xml - - - -``` -~~~ + ```xml + + + + ``` - **GenerateDrivePatterns** The GenerateDrivePatterns function will iterate all of the available drives and select the ones that match the requested drive type. It will then concatenate the selected drives with the end part of *PatternSegment* to form a full encoded file pattern. For example, if *PatternSegment* is `Path [file.txt]` and DriveType is `Fixed`, then the function will generate `C:\Path [file.txt]`, and other patterns if there are fixed drives other than C:. You cannot specify environment variables with this function. You can use GenerateDrivePatterns with <script> elements that are within [<objectSet>](#objectset) that are within <include>/<exclude>. - Syntax: GenerateDrivePatterns("*PatternSegment*","*DriveType*") + Syntax: `GenerateDrivePatterns("PatternSegment","DriveType")` - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

PatternSegment

Yes

The suffix of an encoded pattern. It will be concatenated with a drive specification, such as "c:&quot;, to form a complete encoded file pattern. For example, "* [*.doc]". PatternSegment cannot be an environment variable.

DriveType

Yes

The drive type for which the patterns are to be generated. You can specify one of:

-
    -
  • Fixed

  • -
  • CDROM

  • -
  • Removable

  • -
  • Remote

  • -
+ |Setting|Required?|Value| + |--- |--- |--- | + | *PatternSegment* | Yes | The suffix of an encoded pattern. It will be concatenated with a drive specification, such as "c:", to form a complete [encoded file pattern](#locations). For example, "* [*.doc]". *PatternSegment* cannot be an environment variable. | + | *DriveType* | Yes | The drive type for which the patterns are to be generated. You can specify one of:
  • Fixed
  • CDROM
  • Removable
  • Remote
| - - -~~~ -See the last component in the MigUser.xml file for an example of this element. -~~~ + See the last component in the MigUser.xml file for an example of this element. - **GenerateUserPatterns** @@ -3805,50 +2057,21 @@ See the last component in the MigUser.xml file for an example of this element. - "C:\\Documents and Settings\\C\\\* \[\*.doc\]" - Syntax:GenerateUserPatterns("*ObjectType*","*EncodedLocationPattern*","*ProcessCurrentUser*") + Syntax: `GenerateUserPatterns("ObjectType","EncodedLocationPattern","ProcessCurrentUser")` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

ObjectType

Yes

Defines the object type. Can be File or Registry.

EncodedLocationPattern

Yes

The location pattern. Environment variables are allowed.

ProcessCurrentUser

Yes

Can be TRUE or FALSE. Indicates if the patterns should be generated for the current user.

+ |Setting|Required?|Value| + |--- |--- |--- | + |*ObjectType*|Yes|Defines the object type. Can be File or Registry.| + |*EncodedLocationPattern*|Yes|The [location pattern](#locations). Environment variables are allowed.| + |*ProcessCurrentUser*|Yes|Can be TRUE or FALSE. Indicates if the patterns should be generated for the current user.| - - -~~~ **Example:** If GenerateUserPattens('File','%userprofile% \[\*.doc\]','FALSE') is called while USMT is processing user A, then this function will only generate patterns for users B and C. You can use this helper function to build complex rules. For example, to migrate all .doc files from the source computer — but if user X is not migrated, then do not migrate any of the .doc files from user X's profile. The following is example code for this scenario. The first <rules> element migrates all.doc files on the source computer with the exception of those inside C:\\Documents and Settings. The second <rules> elements will migrate all .doc files from C:\\Documents and Settings with the exception of the .doc files in the profiles of the other users. Because the second <rules> element will be processed in each migrated user context, the end result will be the desired behavior. The end result is the one we expected. -``` xml +```xml @@ -3874,47 +2097,18 @@ The following is example code for this scenario. The first <rules> element ``` -~~~ ### MigXmlHelper.GenerateDocPatterns This helper function invokes the document finder to scan the system for all files that can be migrated. It can be invoked in either System or User context to focus the scan. - ----- - - - - - - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

ScanProgramFiles

No (default = FALSE)

Can be TRUE or FALSE. The ScanProgramFiles parameter determines whether or not the document finder scans the Program Files directory to gather registered file extensions for known applications. For example, when set to TRUE it will discover and migrate .jpg files under the Photoshop directory, if .jpg is a file extension registered to Photoshop.

IncludePatterns

No (default = TRUE)

Can be TRUE or FALSE. TRUE will generate include patterns and can be added under the <include> element. FALSE will generate exclude patterns and can be added under the <exclude> element.

SystemDrive

No (default = FALSE)

Can be TRUE or FALSE. If TRUE, restricts all patterns to the system drive.

+|Setting|Required?|Value| +|--- |--- |--- | +|*ScanProgramFiles*|No (default = FALSE)|Can be TRUE or FALSE. The *ScanProgramFiles* parameter determines whether or not the document finder scans the **Program Files** directory to gather registered file extensions for known applications. For example, when set to TRUE it will discover and migrate .jpg files under the Photoshop directory, if .jpg is a file extension registered to Photoshop.| +|*IncludePatterns*|No (default = TRUE)|Can be TRUE or FALSE. TRUE will generate include patterns and can be added under the <include> element. FALSE will generate exclude patterns and can be added under the <exclude> element.| +|*SystemDrive*|No (default = FALSE)|Can be TRUE or FALSE. If TRUE, restricts all patterns to the system drive.| - - -``` xml +```xml MigDocUser @@ -3941,39 +2135,39 @@ The following scripts have no return value. You can use the following errors wit - **AskForLogoff()**. Prompts the user to log off at the end of the migration. For example: - ``` xml - - - - ``` + ```xml + + + + ``` - **ConvertToShortFileName(RegistryEncodedLocation)**. If *RegistryEncodedLocation* is the full path of an existing file, this function will convert the file to its short file name and then it will update the registry value. - **KillExplorer()**. Stops Explorer.exe for the current user context. This allows access to certain keys and files that are kept open when Explorer.exe is running. For example: - ``` xml - - - - ``` + ```xml + + + + ``` - **RegisterFonts(FileEncodedLocation)**. Registers the given font or all of the fonts in the given directory. For example: - ``` xml - + ```xml + - - ``` + + ``` - **RemoveEmptyDirectories (DirectoryEncodedPattern).** Deletes any empty directories that match *DirectoryEncodedPattern* on the destination computer. - **RestartExplorer().** Restarts Explorer.exe at the end of the migration. For example: - ``` xml - - - - ``` + ```xml + + + + ``` - **StartService (ServiceName, OptionalParam1, OptionalParam2,…).** Starts the service identified by *ServiceName. ServiceName* is the subkey in HKLM\\System\\CurrentControlSet\\Services that holds the data for the given service. The optional parameters, if any, will be passed to the StartService API. For more information, see [this Microsoft Web site](/windows/win32/api/winsvc/nf-winsvc-startservicea). @@ -3994,32 +2188,17 @@ You can use the <text> element to set a value for any environment variable Syntax: -<text>*NormalText*</text> - - ---- - - - - - - - - - - - - -
SettingValue

NormalText

This is interpreted as normal text.

- +```xml +NormalText +``` +|Setting|Value| +|--- |--- | +|*NormalText*|This is interpreted as normal text.| For example: -``` xml +```xml %CSIDL_COMMON_APPDATA%\QuickTime @@ -4040,11 +2219,13 @@ Use this element if you want to exclude all .mp3 files from the source computer. Syntax: -<unconditionalExclude></unconditionalExclude> +```xml + +``` The following .xml file excludes all .mp3 files from migration. For additional examples of how to use this element, see the [Exclude Files and Settings](usmt-exclude-files-and-settings.md). -``` xml +```xml Test @@ -4080,42 +2261,19 @@ The <variable> element is required in an <environment> element. For Syntax: -<variable name="*ID*" remap=TRUE|FALSE> - -</variable> - - ----- - - - - - - - - - - - - - - - - - - - -
SettingRequired?Value

name

Yes

ID is a string value that is the name used to reference the environment variable. We recommend that ID start with the component's name to avoid namespace collisions. For example, if your component's name is MyComponent, and you want a variable that is your component's install path, you could specify MyComponent.InstallPath.

remap

No, default = FALSE

Specifies whether to evaluate this environment variable as a remapping environment variable. Objects that are located in a path that is underneath this environment variable's value are automatically moved to where the environment variable points on the destination computer.

- +```xml + + +``` +|Setting|Required?|Value| +|--- |--- |--- | +|name|Yes|*ID* is a string value that is the name used to reference the environment variable. We recommend that *ID* start with the component's name to avoid namespace collisions. For example, if your component's name is MyComponent, and you want a variable that is your component's install path, you could specify `MyComponent.InstallPath`.| +|remap|No, default = FALSE|Specifies whether to evaluate this environment variable as a remapping environment variable. Objects that are located in a path that is underneath this environment variable's value are automatically moved to where the environment variable points on the destination computer.| The following example is from the MigApp.xml file: -``` xml +```xml HKLM\Software @@ -4139,46 +2297,26 @@ The <version> element defines the version for the component, but does not Syntax: -<version>*ComponentVersion*</version> - - ----- - - - - - - - - - - - - - - -
SettingRequired?Value

ComponentVersion

Yes

The version of the component, which can contain patterns.

- +```xml +ComponentVersion +``` +|Setting|Required?|Value| +|--- |--- |--- | +|*ComponentVersion*|Yes|The version of the component, which can contain patterns.| For example: -``` xml +```xml 4.* ``` ## <windowsObjects> - The <windowsObjects> element is for USMT internal use only. Do not use this element. ## Appendix - ### Specifying locations - **Specifying encoded locations**. The encoded location used in all of the helper functions is an unambiguous string representation for the name of an object. It is composed of the node part, optionally followed by the leaf enclosed in square brackets. This makes a clear distinction between nodes and leaves. @@ -4249,5 +2387,4 @@ The following version tags contain values that can be compared: ## Related topics - -[USMT XML Reference](usmt-xml-reference.md) \ No newline at end of file +[USMT XML Reference](usmt-xml-reference.md) diff --git a/windows/deployment/usmt/usmt-xml-reference.md b/windows/deployment/usmt/usmt-xml-reference.md index ec943180e6..a6df44e4a8 100644 --- a/windows/deployment/usmt/usmt-xml-reference.md +++ b/windows/deployment/usmt/usmt-xml-reference.md @@ -16,64 +16,18 @@ ms.topic: article # USMT XML Reference - This section contains topics that you can use to work with and to customize the migration XML files. ## In This Section - - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Understanding Migration XML Files

Provides an overview of the default and custom migration XML files and includes guidelines for creating and editing a customized version of the MigDocs.xml file.

Config.xml File

Describes the Config.xml file and policies concerning its configuration.

Customize USMT XML Files

Describes how to customize USMT XML files.

Custom XML Examples

Gives examples of XML files for various migration scenarios.

Conflicts and Precedence

Describes the precedence of migration rules and how conflicts are handled.

General Conventions

Describes the XML helper functions.

XML File Requirements

Describes the requirements for custom XML files.

Recognized Environment Variables

Describes environment variables recognized by USMT.

XML Elements Library

Describes the XML elements and helper functions for authoring migration XML files to use with USMT.

- - - - - - - - - - - +| Link | Description | +|--- |--- | +|[Understanding Migration XML Files](understanding-migration-xml-files.md)|Provides an overview of the default and custom migration XML files and includes guidelines for creating and editing a customized version of the MigDocs.xml file.| +|[Config.xml File](usmt-configxml-file.md)|Describes the Config.xml file and policies concerning its configuration.| +|[Customize USMT XML Files](usmt-customize-xml-files.md)|Describes how to customize USMT XML files.| +|[Custom XML Examples](usmt-custom-xml-examples.md)|Gives examples of XML files for various migration scenarios.| +|[Conflicts and Precedence](usmt-conflicts-and-precedence.md)|Describes the precedence of migration rules and how conflicts are handled.| +|[General Conventions](usmt-general-conventions.md)|Describes the XML helper functions.| +|[XML File Requirements](xml-file-requirements.md)|Describes the requirements for custom XML files.| +|[Recognized Environment Variables](usmt-recognized-environment-variables.md)|Describes environment variables recognized by USMT.| +|[XML Elements Library](usmt-xml-elements-library.md)|Describes the XML elements and helper functions for authoring migration XML files to use with USMT.|