diff --git a/windows/deployment/usmt/usmt-what-does-usmt-migrate.md b/windows/deployment/usmt/usmt-what-does-usmt-migrate.md
index 99de18e670..b4964f369a 100644
--- a/windows/deployment/usmt/usmt-what-does-usmt-migrate.md
+++ b/windows/deployment/usmt/usmt-what-does-usmt-migrate.md
@@ -150,8 +150,10 @@ The following components are migrated by default using the manifest files:
Even though it's not required for all applications, it's good practice to install all applications on the destination computer before restoring the user state. Installing applications before migrating settings helps to ensure that migrated settings aren't 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.
-> - 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.
+> 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.
When you specify the `MigApp.xml` file, USMT migrates the settings for the following applications:
diff --git a/windows/deployment/usmt/usmt-xml-elements-library.md b/windows/deployment/usmt/usmt-xml-elements-library.md
index d9b9911c21..545e5e1860 100644
--- a/windows/deployment/usmt/usmt-xml-elements-library.md
+++ b/windows/deployment/usmt/usmt-xml-elements-library.md
@@ -15,21 +15,9 @@ ms.technology: itpro-deploy
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 article 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.
-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)
-
-- [Appendix](#appendix)
-
- - [Specifying locations](#locations)
-
- - [Internal USMT functions](#internalusmtfunctions)
-
- - [Valid version tags](#allowed)
-
-## Elements and Helper Functions
+## Elements and helper functions
The following table describes the XML elements and helper functions you can use with USMT.
@@ -37,17 +25,17 @@ The following table describes the XML elements and helper functions you can use
|-----|----|-----|
| [<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>
+## <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
+- **Number of occurrences:** unlimited
-- **Parent elements:**[<rules>](#rules)
+- **Parent elements:** [<rules>](#rules)
-- **Required child elements:** [<object>](#object) In addition, you must specify [<location>](#location) and [<attribute>](#attribute) as child elements of this <object> element.
+- **Required child elements:** [<object>](#object) In addition, you must specify [<location>](#location) and [<attribute>](#attribute) as child elements of this <object> element.
-- **Optional child elements:**[<conditions>](#conditions), <condition>, [<script>](#script)
+- **Optional child elements:** [<conditions>](#conditions), <condition>, [<script>](#script)
Syntax:
@@ -73,15 +61,15 @@ The following example is from the MigApp.xml file:
```
-## <attributes>
+## <attributes>
The <attributes> element defines the attributes for a registry key or file.
-- **Number of occurrences:** once for each <object>
+- **Number of occurrences:** once for each <object>
-- **Parent elements:**[<object>](#object)
+- **Parent elements:** [<object>](#object)
-- **Child elements:** none
+- **Child elements:** none
Syntax:
@@ -103,15 +91,15 @@ The following example is from the MigApp.xml file:
```
-## <bytes>
+## <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
+- **Number of occurrences:** zero or one
-- **Parent elements:**[<object>](#object)
+- **Parent elements:** [<object>](#object)
-- **Child elements:** none
+- **Child elements:** none
Syntax:
@@ -135,16 +123,15 @@ The following example is from the MigApp.xml file:
```
-## <commandLine>
-
+## <commandLine>
You might want to use the <commandLine> element if you want to start or stop a service or application before or after you run the ScanState and LoadState tools.
-- **Number of occurrences:** unlimited
+- **Number of occurrences:** unlimited
-- **Parent elements:**[<externalProcess>](#externalprocess)
+- **Parent elements:** [<externalProcess>](#externalprocess)
-- **Child elements:** none****
+- **Child elements:** none****
Syntax:
@@ -156,19 +143,19 @@ Syntax:
|--- |--- |--- |
|*CommandLineString*|Yes|A valid command line.|
-## <component>
+## <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.
-- **Number of occurrences:** Unlimited
+- **Number of occurrences:** Unlimited
-- **Parent elements:**[<migration>](#migration), [<role>](#role)
+- **Parent elements:** [<migration>](#migration), [<role>](#role)
-- **Required child elements:**[<role>](#role), [<displayName>](#displayname)
+- **Required child elements:** [<role>](#role), [<displayName>](#displayname)
-- **Optional child elements:**[<manufacturer>](#manufacturer), [<version>](#version), [<description>](#description), [<paths>](#paths), [<icon>](#icon), [<environment>](#bkmk-environment), [<extensions>](#extensions)
+- **Optional child elements:** [<manufacturer>](#manufacturer), [<version>](#version), [<description>](#description), [<paths>](#paths), [<icon>](#icon), [<environment>](#bkmk-environment), [<extensions>](#extensions)
Syntax:
@@ -187,19 +174,19 @@ hidden="Yes|No">
For an example, see any of the default migration .xml files.
-## <condition>
+## <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.
-- **Number of occurrences:** unlimited.
+- **Number of occurrences:** unlimited.
-- **Parent elements:**[<conditions>](#conditions), <detect>, <objectSet>, <addObjects>
+- **Parent elements:** [<conditions>](#conditions), <detect>, <objectSet>, <addObjects>
-- **Child elements:** none
+- **Child elements:** none
-- **Helper functions:** You can use the following [<condition> functions](#conditionfunctions) with this element: DoesOSMatch, IsNative64Bit(), IsOSLaterThan, IsOSEarlierThan, DoesObjectExist, DoesFileVersionMatch, IsFileVersionAbove, IsFileVersionBelow, IsSystemContext, DoesStringContentEqual, DoesStringContentContain, IsSameObject, IsSameContent, and IsSameStringContent.
+- **Helper functions:** You can use the following [<condition> functions](#conditionfunctions) with this element: DoesOSMatch, IsNative64Bit(), IsOSLaterThan, IsOSEarlierThan, DoesObjectExist, DoesFileVersionMatch, IsFileVersionAbove, IsFileVersionBelow, IsSystemContext, DoesStringContentEqual, DoesStringContentContain, IsSameObject, IsSameContent, and IsSameStringContent.
Syntax:
@@ -238,17 +225,17 @@ However, in the code sample below, the <condition> elements, A and B, are
```
-### <condition> functions
+### <condition> functions
The <condition> functions return a Boolean value. You can use these elements in <addObjects> conditions.
-- [Operating system version functions](#operatingsystemfunctions)
+- [Operating system version functions](#operating-system-version-functions)
-- [Object content functions](#objectcontentfunctions)
+- [Object content functions](#object-content-functions)
-### Operating system version functions
+### Operating system version functions
-- **DoesOSMatch**
+- **DoesOSMatch**
All matches are case insensitive.
@@ -265,11 +252,11 @@ The <condition> functions return a Boolean value. You can use these elemen
MigXmlHelper.DoesOSMatch("NT","\*")
```
-- **IsNative64Bit**
+- **IsNative64Bit**
The IsNative64Bit function returns TRUE if the migration process is running as a native 64-bit process; that is, a process running on a 64-bit system without Windows on Windows (WOW). Otherwise, it returns FALSE.
-- **IsOSLaterThan**
+- **IsOSLaterThan**
All comparisons are case insensitive.
@@ -286,7 +273,7 @@ The <condition> functions return a Boolean value. You can use these elemen
MigXmlHelper.IsOSLaterThan("NT","6.0")
```
-- **IsOSEarlierThan**
+- **IsOSEarlierThan**
All comparisons are case insensitive.
@@ -297,8 +284,7 @@ The <condition> functions return a Boolean value. You can use these elemen
|*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
+### Object content functions
- **DoesObjectExist**
@@ -436,15 +422,15 @@ The <condition> functions return a Boolean value. You can use these elemen
|*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>
+## <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)
+- **Number of occurrences:** Unlimited inside another <conditions> element. Limited to one occurrence in [<detection>](#detection), [<rules>](#rules), [<addObjects>](#addobjects), and [<objectSet>](#objectset)
-- **Parent elements:**[<conditions>](#conditions), [<detection>](#detection), [<environment>](#bkmk-environment), [<rules>](#rules), [<addObjects>](#addobjects), and [<objectSet>](#objectset)
+- **Parent elements:** [<conditions>](#conditions), [<detection>](#detection), [<environment>](#bkmk-environment), [<rules>](#rules), [<addObjects>](#addobjects), and [<objectSet>](#objectset)
-- **Child elements:**[<conditions>](#conditions), [<condition>](#condition)
+- **Child elements:** [<conditions>](#conditions), [<condition>](#condition)
Syntax:
@@ -470,17 +456,17 @@ The following example is from the MigApp.xml file:
```
-## <content>
+## <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
+- **Number of occurrences:** unlimited
-- **Parent elements:**[<objectSet>](#objectset)
+- **Parent elements:** [<objectSet>](#objectset)
-- **Child elements:**[<objectSet>](#objectset)
+- **Child elements:** [<objectSet>](#objectset)
-- **Helper functions:** You can use the following [<content> functions](#contentfunctions) with this element: ExtractSingleFile, ExtractMultipleFiles, and ExtractDirectory.
+- **Helper functions:** You can use the following [<content> functions](#contentfunctions) with this element: ExtractSingleFile, ExtractMultipleFiles, and ExtractDirectory.
Syntax:
@@ -493,11 +479,11 @@ Syntax:
|--- |--- |--- |
|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
+### <content> functions
The following functions generate patterns out of the content of an object. These functions are called for every object that the parent <ObjectSet> element is enumerating.
-- **ExtractSingleFile**
+- **ExtractSingleFile**
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.
@@ -520,7 +506,7 @@ The following functions generate patterns out of the content of an object. These
```
-- **ExtractMultipleFiles**
+- **ExtractMultipleFiles**
The ExtractMultipleFiles function returns multiple patterns, one for each file that is found in the content of the given registry value. If the registry value is a MULTI-SZ, the MULTI-SZ separator is considered a separator by default. therefore, for MULTI-SZ, the <Separators> argument must be NULL.
@@ -533,7 +519,7 @@ The following functions generate patterns out of the content of an object. These
|*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**
+- **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.
@@ -557,17 +543,17 @@ The following functions generate patterns out of the content of an object. These
```
-## <contentModify>
+## <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
+- **Number of occurrences:** Unlimited
-- **Parent elements:**[<rules>](#rules)
+- **Parent elements:** [<rules>](#rules)
-- **Required child elements:**[<objectSet>](#objectset)
+- **Required child elements:** [<objectSet>](#objectset)
-- **Helper functions**: You can use the following [<contentModify> functions](#contentmodifyfunctions) with this element: ConvertToDWORD, ConvertToString, ConvertToBinary, KeepExisting, OffsetValue, SetValueByTable, MergeMultiSzContent, and MergeDelimitedContent.
+- **Helper functions**: You can use the following [<contentModify> functions](#contentmodifyfunctions) with this element: ConvertToDWORD, ConvertToString, ConvertToBinary, KeepExisting, OffsetValue, SetValueByTable, MergeMultiSzContent, and MergeDelimitedContent.
Syntax:
@@ -580,11 +566,11 @@ Syntax:
|--- |--- |--- |
|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
+### <contentModify> functions
The following functions change the content of objects as they are migrated. These functions are called for every object that the parent <ObjectSet> element is enumerating.
-- **ConvertToDWORD**
+- **ConvertToDWORD**
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.
@@ -594,7 +580,7 @@ The following functions change the content of objects as they are migrated. Thes
|--- |--- |--- |
|*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**
+- **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.
@@ -614,13 +600,13 @@ The following functions change the content of objects as they are migrated. Thes
```
-- **ConvertToBinary**
+- **ConvertToBinary**
The ConvertToBinary function converts the content of registry values that match the parent <ObjectSet> element to a binary type.
Syntax: `ConvertToBinary ()`
-- **OffsetValue**
+- **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.
@@ -630,7 +616,7 @@ The following functions change the content of objects as they are migrated. Thes
|--- |--- |--- |
|*Value*|Yes|The string representation of a numeric value. It can be positive or negative. For example, `OffsetValue(2)`.|
-- **SetValueByTable**
+- **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.
@@ -642,7 +628,7 @@ The following functions change the content of objects as they are migrated. Thes
|*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**
+- **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.
@@ -652,7 +638,7 @@ The following functions change the content of objects as they are migrated. Thes
|--- |--- |--- |
| *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**
+- **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.
@@ -663,7 +649,7 @@ The following functions change the content of objects as they are migrated. Thes
| *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**
+- **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.
@@ -675,15 +661,15 @@ The following functions change the content of objects as they are migrated. Thes
| *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>
+## <description>
The <description> element defines a description for the component but does not affect the migration.
-- **Number of occurrences:** zero or one
+- **Number of occurrences:** zero or one
-- **Parent elements:**[<component>](#component)
+- **Parent elements:** [<component>](#component)
-- **Child elements:** none
+- **Child elements:** none
Syntax:
@@ -701,22 +687,20 @@ The following code sample shows how the <description> element defines the
My custom component
```
-## <destinationCleanup>
+## <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.
-
-
For each <destinationCleanup> element there can be multiple <objectSet> elements. A common use for this element is if there is a missing registry key on the source computer and you want to ensure that a component is migrated. In this case, you can delete all of the component's registry keys before migrating the source registry keys. This will ensure that if there is a missing key on the source computer, it will also be missing on the destination computer.
-- **Number of occurrences:** Unlimited
+- **Number of occurrences:** Unlimited
-- **Parent elements:**[<rules>](#rules)
+- **Parent elements:** [<rules>](#rules)
-- **Child elements:**[<objectSet>](#objectset) (Note that the destination computer will delete all child elements.)
+- **Child elements:** [<objectSet>](#objectset) (Note that the destination computer will delete all child elements.)
Syntax:
@@ -740,7 +724,7 @@ For example:
```
-## <detect>
+## <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.**
@@ -748,13 +732,13 @@ You use the <detect> element to determine if the component is present on a
For each <detect> element there can be multiple child <condition> or <objectSet> elements, which will be logically joined by an OR operator. If at least one <condition> or <objectSet> element evaluates to TRUE, then the <detect> element evaluates to TRUE.
-- **Number of occurrences:** unlimited
+- **Number of occurrences:** unlimited
-- **Parent elements:** <detects>, [<namedElements>](#namedelements)
+- **Parent elements:** <detects>, [<namedElements>](#namedelements)
-- **Required child elements:**[<condition>](#condition)
+- **Required child elements:** [<condition>](#condition)
-- **Optional child elements:**[<objectSet>](#objectset)
+- **Optional child elements:** [<objectSet>](#objectset)
Syntax:
@@ -770,7 +754,7 @@ Syntax:
For examples, see the examples for [<detection>](#detection).
-## <detects>
+## <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.
@@ -783,11 +767,11 @@ Syntax:
```
-- **Number of occurrences:** Unlimited.
+- **Number of occurrences:** Unlimited.
-- **Parent elements:**[<role>](#role), [<rules>](#rules), [<namedElements>](#namedelements)
+- **Parent elements:** [<role>](#role), [<rules>](#rules), [<namedElements>](#namedelements)
-- **Required child elements:** <detect>
+- **Required child elements:** <detect>
|Setting|Required?|Value|
|--- |--- |--- |
@@ -807,8 +791,7 @@ The following example is from the MigApp.xml file.
```
-## <detection>
-
+## <detection>
The <detection> element is a container for one <conditions> element. The result of the child <condition> elements, located underneath the <conditions> element, determines the result of this element. For example, if all of the child <conditions> elements within the <detection> element resolve to TRUE, then the <detection> element resolves to TRUE. If any of the child <conditions> elements resolve to FALSE, then the <detection> element resolves to FALSE.
@@ -816,11 +799,11 @@ In addition, the results from each <detection> section within the <role
Use the <detection> element under the <namedElements> element if you do not want to write it within a component. Then include a matching <detection> section under the <role> element to control whether the component is migrated. If there is not a <detection> section for a component, then USMT will assume that the component is present.
-- **Number of occurrences:** Unlimited.
+- **Number of occurrences:** Unlimited.
-- **Parent elements:**[<role>](#role), [<namedElements>](#namedelements)
+- **Parent elements:** [<role>](#role), [<namedElements>](#namedelements)
-- **Child elements:**[<conditions>](#conditions)
+- **Child elements:** [<conditions>](#conditions)
Syntax:
@@ -857,16 +840,15 @@ and
```
-## <displayName>
-
+## <displayName>
The <displayName> element is a required field within each <component> element.
-- **Number of occurrences:** once for each component
+- **Number of occurrences:** once for each component
-- **Parent elements:**[<component>](#component)
+- **Parent elements:** [<component>](#component)
-- **Child elements:** none
+- **Child elements:** none
Syntax:
@@ -885,17 +867,17 @@ For example:
Command Prompt settings
```
-## <environment>
+## <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).
+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](#examples).
-- **Number of occurrences:** unlimited
+- **Number of occurrences:** unlimited
-- **Parent elements:**[<role>](#role), [<component>](#component), [<namedElements>](#namedelements)
+- **Parent elements:** [<role>](#role), [<component>](#component), [<namedElements>](#namedelements)
-- **Required child elements:**[<variable>](#variable)
+- **Required child elements:** [<variable>](#variable)
-- **Optional child elements:**[conditions](#conditions)
+- **Optional child elements:** [conditions](#conditions)
Syntax:
@@ -909,7 +891,7 @@ Syntax:
| 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.
|
-##
+## Examples
### Example scenario 1
@@ -989,18 +971,17 @@ Then, you can specify the variable in an <include> rule as follows:
```
-## <exclude>
-
+## <exclude>
The <exclude> element determines what objects will not be migrated, unless there is a more specific <include> element that migrates an object. If there is an <include> and <exclude> element for the same object, the object will be included. For each <exclude> element there can be multiple child <objectSet> elements.
-- **Number of occurrences:** Unlimited
+- **Number of occurrences:** Unlimited
-- **Parent elements:**[<rules>](#rules)
+- **Parent elements:** [<rules>](#rules)
-- **Child elements:**[<objectSet>](#objectset)
+- **Child elements:** [<objectSet>](#objectset)
-- **Helper functions:** You can use the following [<exclude> filter functions](#persistfilterfunctions) with this element: CompareStringContent, IgnoreIrrelevantLinks, AnswerNo, NeverRestore, and SameRegContent.
+- **Helper functions:** You can use the following [<exclude> filter functions](#persistfilterfunctions) with this element: CompareStringContent, IgnoreIrrelevantLinks, AnswerNo, NeverRestore, and SameRegContent.
Syntax:
@@ -1013,7 +994,6 @@ Syntax:
|--- |--- |--- |
|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
@@ -1026,16 +1006,15 @@ For example, from the MigUser.xml file:
```
-## <excludeAttributes>
-
+## <excludeAttributes>
You can use the <excludeAttributes> element to determine which parameters associated with an object will not be migrated. If there are conflicts between the <includeAttributes> and <excludeAttributes> elements, the most specific pattern determines the patterns that will not be migrated. If an object does not have an <includeAttributes> or <excludeAttributes> element, then all of its parameters will be migrated.
-- **Number of occurrences:** Unlimited
+- **Number of occurrences:** Unlimited
-- **Parent elements:**[<rules>](#rules)
+- **Parent elements:** [<rules>](#rules)
-- **Child elements:**[<objectSet>](#objectset)
+- **Child elements:** [<objectSet>](#objectset)
Syntax:
@@ -1099,16 +1078,15 @@ Example:
```
-## <extensions>
-
+## <extensions>
The <extensions> element is a container for one or more <extension> elements.
-- **Number of occurrences:** zero or one
+- **Number of occurrences:** zero or one
-- **Parent elements:**[<component>](#component)
+- **Parent elements:** [<component>](#component)
-- **Required child elements:**[<extension>](#extension)
+- **Required child elements:** [<extension>](#extension)
Syntax:
@@ -1117,16 +1095,15 @@ Syntax:
```
-## <extension>
-
+## <extension>
You can use the <extension> element to specify documents of a specific extension.
-- **Number of occurrences:** unlimited
+- **Number of occurrences:** unlimited
-- **Parent elements:**[<extensions>](#extensions)
+- **Parent elements:** [<extensions>](#extensions)
-- **Child elements:** none
+- **Child elements:** none
Syntax:
@@ -1158,16 +1135,15 @@ is the same as specifying the following code below the <rules> element:
For another example of how to use the <extension> element, see the example for [<excludeAttributes>](#excludeattributes).
-## <externalProcess>
-
+## <externalProcess>
You can use the <externalProcess> element to run a command line during the migration process. For example, you may want to run a command after the LoadState process completes.
-- **Number of occurrences:** Unlimited
+- **Number of occurrences:** Unlimited
-- **Parent elements:**[<rules>](#rules)
+- **Parent elements:** [<rules>](#rules)
-- **Required child elements:**[<commandLine>](#commandline)
+- **Required child elements:** [<commandLine>](#commandline)
Syntax:
@@ -1182,21 +1158,21 @@ Syntax:
For an example of how to use the <externalProcess> element, see the example for [<excludeAttributes>](#excludeattributes).
-## <icon>
+## <icon>
This is an internal USMT element. Do not use this element.
-## <include>
+## <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
+- **Number of occurrences:** Unlimited
-- **Parent elements:**[<rules>](#rules)
+- **Parent elements:** [<rules>](#rules)
-- **Required child element:**[<objectSet>](#objectset)
+- **Required child element:** [<objectSet>](#objectset)
-- **Helper functions:** You can use the following [<include> filter functions](#persistfilterfunctions) with this element: CompareStringContent, IgnoreIrrelevantLinks, AnswerNo, and NeverRestore.
+- **Helper functions:** You can use the following [<include> filter functions](#persistfilterfunctions) with this element: CompareStringContent, IgnoreIrrelevantLinks, AnswerNo, and NeverRestore.
Syntax:
@@ -1239,17 +1215,17 @@ The following example is from the MigUser.xml file:
```
-### <include> and <exclude> filter functions
+### <include> and <exclude> filter functions
The following functions return a Boolean value. You can use them to migrate certain objects based on when certain conditions are met.
-- **AnswerNo**
+- **AnswerNo**
This filter always returns FALSE.
Syntax: `AnswerNo ()`
-- **CompareStringContent**
+- **CompareStringContent**
Syntax: `CompareStringContent("StringContent","CompareType")`
@@ -1258,7 +1234,7 @@ The following functions return a Boolean value. You can use them to migrate cert
| *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**
+- **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.
@@ -1274,7 +1250,7 @@ The following functions return a Boolean value. You can use them to migrate cert
```
-- **NeverRestore**
+- **NeverRestore**
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.
@@ -1290,16 +1266,15 @@ The following functions return a Boolean value. You can use them to migrate cert
```
-## <includeAttributes>
-
+## <includeAttributes>
You can use the <includeAttributes> element to determine whether certain parameters associated with an object will be migrated along with the object itself. If there are conflicts between the <includeAttributes> and <excludeAttributes> elements, the most specific pattern will determine which parameters will be migrated. If an object does not have an <includeAttributes> or <excludeAttributes> element, then all of its parameters will be migrated.
-- **Number of occurrences:** unlimited
+- **Number of occurrences:** unlimited
-- **Parent elements:**[<rules>](#rules)
+- **Parent elements:** [<rules>](#rules)
-- **Child elements:**[<objectSet>](#objectset)
+- **Child elements:** [<objectSet>](#objectset)
Syntax:
@@ -1314,19 +1289,19 @@ Syntax:
For an example of how to use the <includeAttributes> element, see the example for [<excludeAttributes>](#excludeattributes).
-## <library>
+## <library>
This is an internal USMT element. Do not use this element.
-## <location>
+## <location>
The <location> element defines the location of the <object> element.
-- **Number of occurrences:** once for each <object>
+- **Number of occurrences:** once for each <object>
-- **Parent elements:**[<object>](#object)
+- **Parent elements:** [<object>](#object)
-- **Child elements:**[<script>](#script)
+- **Child elements:** [<script>](#script)
Syntax:
@@ -1356,17 +1331,17 @@ The following example is from the MigApp.xml file:
```
-## <locationModify>
+## <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
-- **Parent elements:**[<rules>](#rules)
+- **Parent elements:** [<rules>](#rules)
-- **Required child element:**[<objectSet>](#objectset)
+- **Required child element:** [<objectSet>](#objectset)
-- **Helper functions:** You can use the following [<locationModify> functions](#locationmodifyfunctions) with this element: ExactMove, RelativeMove, and Move.
+- **Helper functions:** You can use the following [<locationModify> functions](#locationmodifyfunctions) with this element: ExactMove, RelativeMove, and Move.
Syntax:
@@ -1389,7 +1364,7 @@ The following example is from the MigApp.xml file:
```
-### <locationModify> functions
+### <locationModify> functions
The following functions change the location of objects as they are migrated when using the <locationModify> element. These functions are called for every object that the parent <ObjectSet> element is enumerating. The <locationModify> element will create the appropriate folder on the destination computer if it does not already exist.
@@ -1413,7 +1388,7 @@ The following functions change the location of objects as they are migrated when
```
-- **Move**
+- **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.
@@ -1423,7 +1398,7 @@ The following functions change the location of objects as they are migrated when
|--- |--- |--- |
|*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**
+- **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.
@@ -1449,21 +1424,19 @@ For example:
```
-## <\_locDefinition>
-
+## <\_locDefinition>
This is an internal USMT element. Do not use this element.
-## <manufacturer>
-
+## <manufacturer>
The <manufacturer> element defines the manufacturer for the component, but does not affect the migration.
-- **Number of occurrences:** zero or one
+- **Number of occurrences:** zero or one
-- **Parent elements:**[<component>](#component)
+- **Parent elements:** [<component>](#component)
-- **Child elements:** none
+- **Child elements:** none
Syntax:
@@ -1475,19 +1448,19 @@ Syntax:
|--- |--- |--- |
|*Name*|Yes|The name of the manufacturer for the component.|
-## <merge>
+## <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).
-- **Number of occurrences:** Unlimited
+- **Number of occurrences:** Unlimited
-- **Parent elements:**[<rules>](#rules)
+- **Parent elements:** [<rules>](#rules)
-- **Required child element:**[<objectSet>](#objectset)
+- **Required child element:** [<objectSet>](#objectset)
-- **Helper functions:** You can use the following [<merge> functions](#mergefunctions) with this element: SourcePriority, DestinationPriority, FindFilePlaceByPattern, LeafPattern, NewestVersion, HigherValue(), and LowerValue().
+- **Helper functions:** You can use the following [<merge> functions](#mergefunctions) with this element: SourcePriority, DestinationPriority, FindFilePlaceByPattern, LeafPattern, NewestVersion, HigherValue(), and LowerValue().
Syntax:
@@ -1517,11 +1490,11 @@ The following example is from the MigUser.xml file:
```
-### <merge> functions
+### <merge> functions
These functions control how collisions are resolved.
-- **DestinationPriority**
+- **DestinationPriority**
Specifies to keep the object that is on the destination computer and not migrate the object from the source computer.
@@ -1537,7 +1510,7 @@ These functions control how collisions are resolved.
```
-- **FindFilePlaceByPattern**
+- **FindFilePlaceByPattern**
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.
@@ -1547,7 +1520,7 @@ These functions control how collisions are resolved.
|--- |--- |--- |
| *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**
+- **NewestVersion**
The NewestVersion function will resolve conflicts on the destination computer based on the version of the file.
@@ -1557,15 +1530,15 @@ These functions control how collisions are resolved.
|--- |--- |--- |
|*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()**
+- **HigherValue()**
You can use this function for merging registry values. The registry values will be evaluated as numeric values, and the one with the higher value will determine which registry values will be merged.
-- **LowerValue()**
+- **LowerValue()**
You can use this function for merging registry values. The registry values will be evaluated as numeric values and the one with the lower value will determine which registry values will be merged.
-- **SourcePriority**
+- **SourcePriority**
Specifies to migrate the object from the source computer, and to delete the object that is on the destination computer.
@@ -1581,17 +1554,17 @@ These functions control how collisions are resolved.
```
-## <migration>
+## <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
+- **Number of occurrences:** one
-- **Parent elements:** none
+- **Parent elements:** none
-- **Required child elements:**[<component>](#component)
+- **Required child elements:** [<component>](#component)
-- **Optional child elements:**[<library>](#library), [<namedElements>](#namedelements)
+- **Optional child elements:** [<library>](#library), [<namedElements>](#namedelements)
Syntax:
@@ -1638,7 +1611,7 @@ This filter helper function can be used to filter the migration of files based o
```
-## <namedElements>
+## <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.
@@ -1649,25 +1622,25 @@ Syntax:
```
-- **Number of occurrences:** Unlimited
+- **Number of occurrences:** Unlimited
-- **Parent elements:**[<migration>](#migration)
+- **Parent elements:** [<migration>](#migration)
-- **Child elements:**[<environment>](#bkmk-environment), [<rules>](#rules), [<conditions>](#conditions), [<detection>](#detection), <detects>, <detect>
+- **Child elements:** [<environment>](#bkmk-environment), [<rules>](#rules), [<conditions>](#conditions), [<detection>](#detection), <detects>, <detect>
For an example of this element, see the MigApp.xml file.
-## <object>
+## <object>
The <object> element represents a file or registry key.
-- **Number of occurrences:** Unlimited
+- **Number of occurrences:** Unlimited
-- **Parent elements:**[<addObjects>](#addobjects)
+- **Parent elements:** [<addObjects>](#addobjects)
-- **Required child elements:**[<location>](#location), [<attributes>](#attribute)
+- **Required child elements:** [<location>](#location), [<attributes>](#attribute)
-- **Optional child elements:**[<bytes>](#bytes)
+- **Optional child elements:** [<bytes>](#bytes)
Syntax:
@@ -1693,18 +1666,17 @@ The following example is from the MigApp.xml file:
```
-## <objectSet>
-
+## <objectSet>
The <objectSet> element contains a list of object patterns ; for example, file paths, registry locations, and so on. Any child <conditions> elements will be evaluated first. If all child <conditions> elements return FALSE, the <objectSet> element will evaluate to an empty set. For each parent element, there can be only multiple <objectSet> elements.
-- **Number of occurrences:** Unlimited
+- **Number of occurrences:** Unlimited
-- **Parent elements:**[<variable>](#variable), [<content>](#content), [<include>](#include), [<exclude>](#exclude), [<merge>](#merge), [<contentModify>](#contentmodify), [<locationModify>](#locationmodify), [<destinationCleanup>](#destinationcleanup), [<includeAttributes>](#includeattributes), [<excludeAttributes>](#excludeattributes), [<unconditionalExclude>](#unconditionalexclude), <detect>
+- **Parent elements:** [<variable>](#variable), [<content>](#content), [<include>](#include), [<exclude>](#exclude), [<merge>](#merge), [<contentModify>](#contentmodify), [<locationModify>](#locationmodify), [<destinationCleanup>](#destinationcleanup), [<includeAttributes>](#includeattributes), [<excludeAttributes>](#excludeattributes), [<unconditionalExclude>](#unconditionalexclude), <detect>
-- **Required child elements:** either [<script>](#script) or [<pattern>](#pattern)
+- **Required child elements:** either [<script>](#script) or [<pattern>](#pattern)
-- **Optional child elements:**[<content>](#content), [conditions](#conditions), <condition>
+- **Optional child elements:** [<content>](#content), [conditions](#conditions), <condition>
Syntax:
@@ -1743,19 +1715,16 @@ The following example is from the MigUser.xml file:
```
-## <path>
-
+## <path>
This is an internal USMT element. Do not use this element.
-## <paths>
-
+## <paths>
This is an internal USMT element. Do not use this element.
## <pattern>
-
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
@@ -1763,11 +1732,11 @@ You can use this element to specify multiple objects. You can specify multiple &
```
-- **Number of occurrences:** Unlimited
+- **Number of occurrences:** Unlimited
-- **Parent elements:**[<objectSet>](#objectset)
+- **Parent elements:** [<objectSet>](#objectset)
-- **Child elements:** none but *Path* \[*object*\] must be valid.
+- **Child elements:** none but *Path* \[*object*\] must be valid.
Syntax:
@@ -1782,45 +1751,45 @@ Syntax:
For example:
-- To migrate a single registry key:
+- To migrate a single registry key:
```xml
HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache [Persistent]
```
-- To migrate the EngineeringDrafts folder and any subfolders from the C: drive:
+- To migrate the EngineeringDrafts folder and any subfolders from the C: drive:
```xml
C:\EngineeringDrafts\* [*]
```
-- To migrate only the EngineeringDrafts folder, excluding any subfolders, from the C: drive:
+- To migrate only the EngineeringDrafts folder, excluding any subfolders, from the C: drive:
[Reroute Files and Settings](usmt-reroute-files-and-settings.md)
-- To migrate the Sample.doc file from C:\\EngineeringDrafts:
+- To migrate the Sample.doc file from C:\\EngineeringDrafts:
```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.
+- 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
C:\* [Sample.doc]
```
-- For more examples of how to use this element, see [Exclude Files and Settings](usmt-exclude-files-and-settings.md), [Reroute Files and Settings](usmt-reroute-files-and-settings.md), [Include Files and Settings](usmt-include-files-and-settings.md), and [Custom XML Examples](usmt-custom-xml-examples.md).
+- For more examples of how to use this element, see [Exclude Files and Settings](usmt-exclude-files-and-settings.md), [Reroute Files and Settings](usmt-reroute-files-and-settings.md), [Include Files and Settings](usmt-include-files-and-settings.md), and [Custom XML Examples](usmt-custom-xml-examples.md).
-## <processing>
+## <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
+- **Number of occurrences:** unlimited
-- **Parent elements:**[<rules>](#rules)
+- **Parent elements:** [<rules>](#rules)
-- **Required child element:**[<script>](#script)
+- **Required child element:** [<script>](#script)
Syntax:
@@ -1833,21 +1802,21 @@ Syntax:
|--- |--- |--- |
| 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>
+## <plugin>
This is an internal USMT element. Do not use this element.
-## <role>
+## <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.
+- **Number of occurrences:** Each <component> can have one, two or three child <role> elements.
-- **Parent elements:**[<component>](#component), [<role>](#role)
+- **Parent elements:** [<component>](#component), [<role>](#role)
-- **Required child elements:**[<rules>](#rules)
+- **Required child elements:** [<rules>](#rules)
-- **Optional child elements:**[<environment>](#bkmk-environment), [<detection>](#detection), [<component>](#component), [<role>](#role), <detects>, <plugin>,
+- **Optional child elements:** [<environment>](#bkmk-environment), [<detection>](#detection), [<component>](#component), [<role>](#role), <detects>, <plugin>,
Syntax:
@@ -1891,18 +1860,17 @@ The following example is from the MigUser.xml file. For more examples, see the M
```
-## <rules>
-
+## <rules>
The <rules> element is required in a custom .xml file. This element contains rules that will run during the migration if the parent <component> element is selected, unless the child <conditions> element, if present, evaluates to FALSE. For each <rules> element there can be multiple child <rules> elements.
-- **Number of occurrences:** unlimited
+- **Number of occurrences:** unlimited
-- **Parent elements:**[<role>](#role), [<rules>](#rules), [<namedElements>](#namedelements)
+- **Parent elements:** [<role>](#role), [<rules>](#rules), [<namedElements>](#namedelements)
-- **Required child elements:**[<include>](#include)
+- **Required child elements:** [<include>](#include)
-- **Optional child elements:**[<rules>](#rules), [<exclude>](#exclude), [<unconditionalExclude>](#unconditionalexclude),[<merge>](#merge), [<contentModify>](#contentmodify), [<locationModify>](#locationmodify), [<destinationCleanup>](#destinationcleanup), [<addObjects>](#addobjects), [<externalProcess>](#externalprocess), [<processing>](#processing), [<includeAttributes>](#includeattributes), [<excludeAttributes>](#excludeattributes), [conditions](#conditions), <detects>
+- **Optional child elements:** [<rules>](#rules), [<exclude>](#exclude), [<unconditionalExclude>](#unconditionalexclude),[<merge>](#merge), [<contentModify>](#contentmodify), [<locationModify>](#locationmodify), [<destinationCleanup>](#destinationcleanup), [<addObjects>](#addobjects), [<externalProcess>](#externalprocess), [<processing>](#processing), [<includeAttributes>](#includeattributes), [<excludeAttributes>](#excludeattributes), [conditions](#conditions), <detects>
Syntax:
@@ -1946,40 +1914,39 @@ The following example is from the MigUser.xml file:
```
-## <script>
-
+## <script>
The return value that is required by <script> depends on the parent element.
**Number of occurrences:** Once for [<variable>](#variable), unlimited for [<objectSet>](#objectset) and [<processing>](#processing)
-**Parent elements:**[<objectSet>](#objectset), [<variable>](#variable), [<processing>](#processing)
+**Parent elements:** [<objectSet>](#objectset), [<variable>](#variable), [<processing>](#processing)
**Child elements:** none
**Syntax and helper functions:**
-- General Syntax: ``
+- General Syntax: ``
-- You can use [GetStringContent](#scriptfunctions) when <script> is within <variable>.
+- You can use [GetStringContent](#scriptfunctions) when <script> is within <variable>.
Syntax: ``
Example: ``
-- You can use [GenerateUserPatterns](#scriptfunctions) when <script> is within <objectSet>.
+- You can use [GenerateUserPatterns](#scriptfunctions) when <script> is within <objectSet>.
Syntax: ``
Example: ``
-- You can use [GenerateDrivePatterns](#scriptfunctions) when <script> is within <objectSet>.
+- You can use [GenerateDrivePatterns](#scriptfunctions) when <script> is within <objectSet>.
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.
+- 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: ``
@@ -1999,19 +1966,19 @@ To migrate the Sample.doc file from any drive on the source computer, use <sc
For more examples of how to use this element, see [Exclude Files and Settings](usmt-exclude-files-and-settings.md), [Reroute Files and Settings](usmt-reroute-files-and-settings.md), and [Custom XML Examples](usmt-custom-xml-examples.md).
-### <script> functions
+### <script> functions
You can use the following functions with the <script> element
-- [String and pattern generating functions](#stringgeneratingfunctions)
+- [String and pattern generating functions](#stringgeneratingfunctions)
-- [Simple executing scripts](#simple)
+- [Simple executing scripts](#simple)
-### String and pattern generating functions
+### String and pattern generating functions
These functions return either a string or a pattern.
-- **GetStringContent**
+- **GetStringContent**
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.
@@ -2048,11 +2015,11 @@ These functions return either a string or a pattern.
The function will iterate through all users that are being migrated, excluding the currently processed user if <ProcessCurrentUser> is FALSE, and will expand the specified pattern in the context of each user. For example, if users A, B and C have profiles in C:\\Documents and Settings), by calling `GenerateUserPattens('File','%userprofile% [*.doc]','TRUE')`, the helper function will generate the following three patterns:
- - "C:\\Documents and Settings\\A\\\* \[\*.doc\]"
+ - "C:\\Documents and Settings\\A\\\* \[\*.doc\]"
- - "C:\\Documents and Settings\\B\\\* \[\*.doc\]"
+ - "C:\\Documents and Settings\\B\\\* \[\*.doc\]"
- - "C:\\Documents and Settings\\C\\\* \[\*.doc\]"
+ - "C:\\Documents and Settings\\C\\\* \[\*.doc\]"
Syntax: `GenerateUserPatterns("ObjectType","EncodedLocationPattern","ProcessCurrentUser")`
@@ -2126,11 +2093,11 @@ This helper function invokes the document finder to scan the system for all file
```
-### Simple executing scripts
+### Simple executing scripts
The following scripts have no return value. You can use the following errors with <script> elements that are within <processing> elements
-- **AskForLogoff()**. Prompts the user to log off at the end of the migration. For example:
+- **AskForLogoff()**. Prompts the user to log off at the end of the migration. For example:
```xml
@@ -2138,9 +2105,9 @@ The following scripts have no return value. You can use the following errors wit
```
-- **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.
+- **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:
+- **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
@@ -2148,7 +2115,7 @@ The following scripts have no return value. You can use the following errors wit
```
-- **RegisterFonts(FileEncodedLocation)**. Registers the given font or all of the fonts in the given directory. For example:
+- **RegisterFonts(FileEncodedLocation)**. Registers the given font or all of the fonts in the given directory. For example:
```xml
@@ -2156,9 +2123,9 @@ The following scripts have no return value. You can use the following errors wit
```
-- **RemoveEmptyDirectories (DirectoryEncodedPattern).** Deletes any empty directories that match *DirectoryEncodedPattern* on the destination computer.
+- **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:
+- **RestartExplorer().** Restarts Explorer.exe at the end of the migration. For example:
```xml
@@ -2166,22 +2133,21 @@ The following scripts have no return value. You can use the following errors wit
```
-- **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).
+- **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).
-- **StopService (ServiceName)**. Stops the service that is identified by *ServiceName. ServiceName* is the subkey in HKLM\\System\\CurrentControlSet\\Services that holds the data for the given service.
+- **StopService (ServiceName)**. Stops the service that is identified by *ServiceName. ServiceName* is the subkey in HKLM\\System\\CurrentControlSet\\Services that holds the data for the given service.
-- **SyncSCM(ServiceShortName).** Reads the Start type value from the registry (HKLM\\System\\CurrentControlSet\\Services\\ServiceShortName \[Start\]) after it is changed by the migration engine, and then synchronizes Service Control Manager (SCM) with the new value.
-
-## <text>
+- **SyncSCM(ServiceShortName).** Reads the Start type value from the registry (HKLM\\System\\CurrentControlSet\\Services\\ServiceShortName \[Start\]) after it is changed by the migration engine, and then synchronizes Service Control Manager (SCM) with the new value.
+## <text>
You can use the <text> element to set a value for any environment variables that are inside one of the migration .xml files.
-- **Number of occurrences:** Once in each [<variable>](#variable) element.
+- **Number of occurrences:** Once in each [<variable>](#variable) element.
-- **Parent elements:**[<variable>](#variable)
+- **Parent elements:** [<variable>](#variable)
-- **Child elements:** None.
+- **Child elements:** None.
Syntax:
@@ -2201,18 +2167,17 @@ For example:
```
-## <unconditionalExclude>
-
+## <unconditionalExclude>
The <unconditionalExclude> element excludes the specified files and registry values from the migration, regardless of the other include rules in any of the migration .xml files or in the Config.xml file. The objects declared here will not be migrated because this element takes precedence over all other rules. For example, even if there are explicit <include> rules to include .mp3 files, if you specify to exclude them with this option, then they will not be migrated.
Use this element if you want to exclude all .mp3 files from the source computer. Or, if you are backing up C:\\UserData using another method, you can exclude the entire folder from the migration. Use this element with caution, however, because if an application needs a file that you exclude, the application may not function properly on the destination computer.
-- **Number of occurrences:** Unlimited.
+- **Number of occurrences:** Unlimited.
-- **Parent elements:**[<rules>](#rules)
+- **Parent elements:** [<rules>](#rules)
-- **Child elements:**[<objectSet>](#objectset)
+- **Child elements:** [<objectSet>](#objectset)
Syntax:
@@ -2239,8 +2204,7 @@ The following .xml file excludes all .mp3 files from migration. For additional e
```
-## <variable>
-
+## <variable>
The <variable> element is required in an <environment> element. For each <variable> element there must be one <objectSet>, <script>, or <text> element. The content of the <variable> element assigns a text value to the environment variable. This element has the following three options:
@@ -2250,11 +2214,11 @@ The <variable> element is required in an <environment> element. For
3. If the <variable> element contains an <objectSet> element and the evaluation of the <objectSet> element produces at least one object pattern, then the value of the first object to match the resulting object pattern will be the value of the variable element.
-- **Number of occurrences:** Unlimited
+- **Number of occurrences:** Unlimited
-- **Parent elements:**[<environment>](#bkmk-environment)
+- **Parent elements:** [<environment>](#bkmk-environment)
-- **Required child elements:** either [<text>](#text), or [<script>](#script), or [<objectSet>](#objectset)
+- **Required child elements:** either [<text>](#text), or [<script>](#script), or [<objectSet>](#objectset)
Syntax:
@@ -2281,16 +2245,15 @@ The following example is from the MigApp.xml file:
```
-## <version>
-
+## <version>
The <version> element defines the version for the component, but does not affect the migration.
-- **Number of occurrences:** zero or one
+- **Number of occurrences:** zero or one
-- **Parent elements:**[<component>](#component)
+- **Parent elements:** [<component>](#component)
-- **Child elements:** none
+- **Child elements:** none
Syntax:
@@ -2308,80 +2271,80 @@ For example:
4.*
```
-## <windowsObjects>
+## <windowsObjects>
The <windowsObjects> element is for USMT internal use only. Do not use this element.
## Appendix
-### Specifying locations
+### 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.
+- **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.
For example, specify the file C:\\Windows\\Notepad.exe like this: `c:\Windows[Notepad.exe]`. Similarly, specify the directory C:\\Windows\\System32 like this: `c:\Windows\System32`. (Notice the absence of the \[\] construct.)
Representing the registry is very similar. The default value of a registry key is represented as an empty \[\] construct. For example, the default value for the HKLM\\SOFTWARE\\MyKey registry key will be `HKLM\SOFTWARE\MyKey[]`.
-- **Specifying location patterns**. You specify a location pattern in a way that is similar to how you specify an actual location. The exception is that both the node and leaf part accept patterns. However, a pattern from the node does not extend to the leaf.
+- **Specifying location patterns**. You specify a location pattern in a way that is similar to how you specify an actual location. The exception is that both the node and leaf part accept patterns. However, a pattern from the node does not extend to the leaf.
For example, the pattern `c:\Windows\*` will match the Windows directory and all subdirectories. But it will not match any of the files in those directories. To match the files as well, you must specify `c:\Windows\*[*]`.
-### Internal USMT functions
+### Internal USMT functions
The following functions are for internal USMT use only. Do not use them in an .xml file.
-- AntiAlias
+- AntiAlias
-- ConvertScreenSaver
+- ConvertScreenSaver
-- ConvertShowIEOnDesktop
+- ConvertShowIEOnDesktop
-- ConvertToOfficeLangID
+- ConvertToOfficeLangID
-- MigrateActiveDesktop
+- MigrateActiveDesktop
-- MigrateAppearanceUPM
+- MigrateAppearanceUPM
-- MigrateDisplayCS
+- MigrateDisplayCS
-- MigrateDisplaySS
+- MigrateDisplaySS
-- MigrateIEAutoSearch
+- MigrateIEAutoSearch
-- MigrateMouseUPM
+- MigrateMouseUPM
-- MigrateSoundSysTray
+- MigrateSoundSysTray
-- MigrateTaskBarSS
+- MigrateTaskBarSS
-- SetPstPathInMapiStruc
+- SetPstPathInMapiStruc
-### Valid version tags
+### Valid version tags
You can use the following version tags with various helper functions:
-- "CompanyName"
+- "CompanyName"
-- "FileDescription"
+- "FileDescription"
-- "FileVersion"
+- "FileVersion"
-- "InternalName"
+- "InternalName"
-- "LegalCopyright"
+- "LegalCopyright"
-- "OriginalFilename"
+- "OriginalFilename"
-- "ProductName"
+- "ProductName"
-- "ProductVersion"
+- "ProductVersion"
The following version tags contain values that can be compared:
-- "FileVersion"
+- "FileVersion"
-- "ProductVersion"
+- "ProductVersion"
-## Related topics
+## Related articles
-[USMT XML Reference](usmt-xml-reference.md)
+[USMT XML reference](usmt-xml-reference.md)