fix: Replace syntax with langauge code 2

This commit is contained in:
Nick Schonning
2019-07-18 01:24:10 -04:00
parent b9b4d2a15b
commit 4af3d5650c
50 changed files with 290 additions and 292 deletions

View File

@ -104,7 +104,7 @@ It is possible to run the ScanState tool while the drive remains encrypted by su
User-group membership is not preserved during offline migrations. You must configure a **<ProfileControl>** section in the Config.xml file to specify the groups that the migrated users should be made members of. The following example places all migrated users into the Users group:
``` syntax
```xml
<Configuration>
<ProfileControl>
<localGroups>
@ -242,7 +242,7 @@ Syntax: &lt;failOnMultipleWinDir&gt;1&lt;/failOnMultipleWinDir&gt; or Syntax: &l
The following XML example illustrates some of the elements discussed earlier in this topic.
``` syntax
```xml
<offline>
<winDir>
<path>C:\Windows</path>

View File

@ -319,7 +319,7 @@ MigXmlHelper.GenerateDocPatterns ("<ScanProgramFiles>", "<IncludePatterns>", "<S
To create include data patterns for only the system drive:
``` syntax
```xml
<include filter='MigXmlHelper.IgnoreIrrelevantLinks()'>
<objectSet>
<script>MigXmlHelper.GenerateDocPatterns ("FALSE","TRUE","TRUE")</script>
@ -329,7 +329,7 @@ To create include data patterns for only the system drive:
To create an include rule to gather files for registered extensions from the %PROGRAMFILES% directory:
``` syntax
```xml
<include filter='MigXmlHelper.IgnoreIrrelevantLinks()'>
<objectSet>
<script>MigXmlHelper.GenerateDocPatterns ("TRUE","TRUE","FALSE")</script>
@ -339,7 +339,7 @@ To create an include rule to gather files for registered extensions from the %PR
To create exclude data patterns:
``` syntax
```xml
<exclude filter='MigXmlHelper.IgnoreIrrelevantLinks()'>
<objectSet>
<script>MigXmlHelper.GenerateDocPatterns ("FALSE","FALSE","FALSE")</script>
@ -440,7 +440,7 @@ To exclude the new text document.txt file as well as any .txt files in “new fo
To exclude Rule 1, there needs to be an exact match of the file name. However, for Rule 2, you can create a pattern to exclude files by using the file name extension.
``` syntax
```xml
<exclude>
<objectSet>
<pattern type="File">D:\Newfolder\[new text document.txt]</pattern>
@ -453,7 +453,7 @@ To exclude Rule 1, there needs to be an exact match of the file name. However, f
If you do not know the file name or location of the file, but you do know the file name extension, you can use the **GenerateDrivePatterns** function. However, the rule will be less specific than the default include rule generated by the MigDocs.xml file, so it will not have precedence. You must use the &lt;UnconditionalExclude&gt; element to give this rule precedence over the default include rule. For more information about the order of precedence for XML migration rules, see [Conflicts and Precedence](usmt-conflicts-and-precedence.md).
``` syntax
```xml
<unconditionalExclude>
<objectSet>
<script>MigXmlHelper.GenerateDrivePatterns ("*[*.txt]", "Fixed")</script>
@ -465,7 +465,7 @@ If you do not know the file name or location of the file, but you do know the fi
If you want the &lt;UnconditionalExclude&gt; element to apply to both the system and user context, you can create a third component using the **UserandSystem** context. Rules in this component will be run in both contexts.
``` syntax
```xml
<component type="Documents" context="UserandSystem">
<displayName>MigDocExcludes</displayName>
<role role="Data">
@ -490,7 +490,7 @@ The application data directory is the most common location that you would need t
This rule will include .pst files that are located in the default location, but are not linked to Microsoft Outlook. Use the user context to run this rule for each user on the computer.
``` syntax
```xml
<include filter='MigXmlHelper.IgnoreIrrelevantLinks()'>
<objectSet>
<pattern type="File">%CSIDL_LOCAL_APPDATA%\Microsoft\Outlook\*[*.pst]</pattern>
@ -502,7 +502,7 @@ This rule will include .pst files that are located in the default location, but
For locations outside the user profile, such as the Program Files folder, you can add the rule to the system context component.
``` syntax
```xml
<include filter='MigXmlHelper.IgnoreIrrelevantLinks()'>
<objectSet>
<pattern type="File">%CSIDL_PROGRAM_FILES%\*[*.pst]</pattern>

View File

@ -98,7 +98,7 @@ As the authorized administrator, it is your responsibility to protect the privac
Although it is not a requirement, it is good practice for &lt;CustomFileName&gt; to match the name of the file. For example, the following is from the MigApp.xml file:
``` syntax
```xml
<?xml version="1.0" encoding="UTF-8"?>
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/migapp">
```

View File

@ -95,7 +95,7 @@ The following example specifies that all locked files, regardless of their locat
Additionally, the order in the **&lt;ErrorControl&gt;** section implies priority. In this example, the first **&lt;nonFatal&gt;** tag takes precedence over the second **&lt;fatal&gt;** tag. This precedence is applied, regardless of how many tags are listed.
``` syntax
```xml
<ErrorControl>
<fileError>
<nonFatal errorCode="33">* [*]</nonFatal>
@ -265,7 +265,7 @@ The **&lt;ErrorControl&gt;** section can be configured to conditionally ignore f
``` syntax
```xml
<Policy>
<HardLinkStoreControl>
<fileLocked>

View File

@ -68,7 +68,7 @@ If you have an &lt;include&gt; rule in one component and a &lt;locationModify&gt
The following .xml file migrates all files from C:\\Userdocs, including .mp3 files, because the &lt;exclude&gt; rule is specified in a separate component.
``` syntax
```xml
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/UserDocs">
<component type="Documents" context="System">
<displayName>User Documents</displayName>
@ -102,7 +102,7 @@ The following .xml file migrates all files from C:\\Userdocs, including .mp3 fil
Specifying `migrate="no"` in the Config.xml file is the same as deleting the corresponding component from the migration .xml file. However, if you set `migrate="no"` for My Documents, but you have a rule similar to the one shown below in a migration .xml file (which includes all of the .doc files from My Documents), then only the .doc files will be migrated, and all other files will be excluded.
``` syntax
```xml
<include>
<objectSet>
<pattern type="File">%CSIDL_PERSONAL%\* [*.doc] </pattern>
@ -135,7 +135,7 @@ If there are conflicting rules within a component, the most specific rule is app
In the following example, mp3 files will not be excluded from the migration. This is because directory names take precedence over the file extensions.
``` syntax
```xml
<include>
<objectSet>
<pattern type="File">C:\Data\* [*]</pattern>
@ -390,7 +390,7 @@ The destination computer contains the following files:
You have a custom .xml file that contains the following code:
``` syntax
```xml
<include>
<objectSet>
<pattern type="File">c:\data\* [*]</pattern>

View File

@ -36,7 +36,7 @@ Because the tables in this topic are wide, you may need to adjust the width of i
The following is a template for the sections that you need to migrate your application. The template is not functional on its own, but you can use it to write your own .xml file.
``` syntax
```xml
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/migtestapp">
<component type="Application">
<!-- Name of the application -->
@ -195,7 +195,7 @@ This table describes the behavior in the following example .xml file.
``` syntax
```xml
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/testfilemig">
<component type="Application" context="System">
<displayName>File Migration Test</displayName>
@ -231,7 +231,7 @@ This table describes the behavior in the following example .xml file.
The behavior for this custom .xml file is described within the &lt;`displayName`&gt; tags in the code.
``` syntax
```xml
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
<component type="Documents" context="System">

View File

@ -209,7 +209,7 @@ You must use the **/nocompress** option with the **/HardLink** option.
The following XML sample specifies that files locked by an application under the \\Users directory can remain in place during the migration. It also specifies that locked files that are not located in the \\Users directory should result in the **File in Use** error. It is important to exercise caution when specifying the paths using the **File in Use&lt;createhardlink&gt;** tag in order to minimize scenarios that make the hard-link migration store more difficult to delete.
``` syntax
```xml
<Policies>
<HardLinkStoreControl>
<fileLocked>

View File

@ -37,7 +37,7 @@ In this topic:
The following .xml file migrates a single registry key.
``` syntax
```xml
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
<component type="Application" context="System">
<displayName>Component to migrate only registry value string</displayName>
@ -63,7 +63,7 @@ The following examples show how to migrate a folder from a specific drive, and f
- **Including subfolders.** The following .xml file migrates all files and subfolders from C:\\EngineeringDrafts to the destination computer.
``` syntax
```xml
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
<component type="Documents" context="System">
<displayName>Component to migrate all Engineering Drafts Documents including subfolders</displayName>
@ -82,7 +82,7 @@ The following examples show how to migrate a folder from a specific drive, and f
- **Excluding subfolders.** The following .xml file migrates all files from C:\\EngineeringDrafts, but it does not migrate any subfolders within C:\\EngineeringDrafts.
``` syntax
```xml
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
<component type="Documents" context="System">
<displayName>Component to migrate all Engineering Drafts Documents without subfolders</displayName>
@ -103,7 +103,7 @@ The following examples show how to migrate a folder from a specific drive, and f
The following .xml file migrates all files and subfolders of the EngineeringDrafts folder from any drive on the computer. If multiple folders exist with the same name, then all files with this name are migrated.
``` syntax
```xml
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
<component type="Documents" context="System">
<displayName>Component to migrate all Engineering Drafts Documents folder on any drive on the computer </displayName>
@ -123,7 +123,7 @@ The following .xml file migrates all files and subfolders of the EngineeringDraf
The following .xml file migrates all files and subfolders of the EngineeringDrafts folder from any location on the C:\\ drive. If multiple folders exist with the same name, they are all migrated.
``` syntax
```xml
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
<component type="Documents" context="System">
<displayName>Component to migrate all Engineering Drafts Documents EngineeringDrafts folder from where ever it exists on the C: drive </displayName>
@ -146,7 +146,7 @@ The following .xml file migrates all files and subfolders of the EngineeringDraf
The following .xml file migrates .mp3 files located in the specified drives on the source computer into the C:\\Music folder on the destination computer.
``` syntax
```xml
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
<component type="Documents" context="System">
<displayName>All .mp3 files to My Documents</displayName>
@ -176,7 +176,7 @@ The following examples show how to migrate a file from a specific folder, and ho
- **To migrate a file from a folder.** The following .xml file migrates only the Sample.doc file from C:\\EngineeringDrafts on the source computer to the destination computer.
``` syntax
```xml
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
<component type="Documents" context="System">
<displayName>Component to migrate all Engineering Drafts Documents</displayName>
@ -195,13 +195,13 @@ The following examples show how to migrate a file from a specific folder, and ho
- **To migrate a file from any location.** To migrate the Sample.doc file from any location on the C:\\ drive, use the &lt;pattern&gt; element, as the following example shows. If multiple files exist with the same name on the C:\\ drive, all of files with this name are migrated.
``` syntax
```xml
<pattern type="File"> C:\* [Sample.doc] </pattern>
```
To migrate the Sample.doc file from any drive on the computer, use &lt;script&gt; as the following example shows. If multiple files exist with the same name, all files with this name are migrated.
``` syntax
```xml
<script>MigXmlHelper.GenerateDrivePatterns("* [sample.doc]", "Fixed")</script>
```

View File

@ -294,7 +294,7 @@ To migrate these files you author the following migration XML:
However, upon testing the migration you notice that the “New Text Document.txt” file isnt included in the migration. To troubleshoot this failure, the migration can be repeated with the environment variable MIG\_ENABLE\_DIAG set such that the diagnostic log is generated. Upon searching the diagnostic log for the component “DATA1”, the following XML section is discovered:
``` syntax
```xml
<MigUnitList>
<MigUnit Name="&lt;System&gt;\DATA1 (CMXEAgent)" Context="System" ConfidenceLevel="100" Group="Applications" Role="UserData" Agent="CMXEAgent" Selected="true" Supported="true">
<Patterns Type="Include">
@ -315,13 +315,13 @@ Analysis of this XML section reveals the migunit that was created when the migra
An analysis of the XML elements reference topic reveals that the &lt;pattern&gt; tag needs to be modified as follows:
``` syntax
```xml
<pattern type="File">c:\data\* [*]</pattern>
```
When the migration is preformed again with the modified tag, the diagnostic log reveals the following:
``` syntax
```xml
<MigUnitList>
<MigUnit Name="&lt;System&gt;\DATA1 (CMXEAgent)" Context="System" ConfidenceLevel="100" Group="Applications" Role="UserData" Agent="CMXEAgent" Selected="true" Supported="true">
<Patterns Type="Include">
@ -396,7 +396,7 @@ You author the following migration XML:
However, upon testing the migration you notice that all the text files are still included in the migration. In order to troubleshoot this issue, the migration can be performed with the environment variable MIG\_ENABLE\_DIAG set so that the diagnostic log is generated. Upon searching the diagnostic log for the component “DATA1”, the following XML section is discovered:
``` syntax
```xml
<MigUnitList>
<MigUnit Name="&lt;System&gt;\DATA1 (CMXEAgent)" Context="System" ConfidenceLevel="100" Group="Applications" Role="UserData" Agent="CMXEAgent" Selected="true" Supported="true">
<Patterns Type="Include">
@ -453,7 +453,7 @@ Upon reviewing the diagnostic log, you confirm that the files are still migratin
Your revised migration XML script excludes the files from migrating, as confirmed in the diagnostic log:
``` syntax
```xml
<MigUnitList>
<MigUnit Name="&lt;System&gt;\DATA1 (CMXEAgent)" Context="System" ConfidenceLevel="100" Group="Applications" Role="UserData" Agent="CMXEAgent" Selected="true" Supported="true">
<Patterns Type="Include">

View File

@ -31,7 +31,7 @@ In this topic:
The following custom .xml file migrates the directories and files from C:\\EngineeringDrafts into the My Documents folder of every user. %CSIDL\_PERSONAL% is the virtual folder representing the My Documents desktop item, which is equivalent to CSIDL\_MYDOCUMENTS.
``` syntax
```xml
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
<component type="Documents" context="User">
<displayName>Engineering Drafts Documents to Personal Folder</displayName>
@ -60,7 +60,7 @@ The following custom .xml file migrates the directories and files from C:\\Engin
The following custom .xml file reroutes .mp3 files located in the fixed drives on the source computer into the C:\\Music folder on the destination computer.
``` syntax
```xml
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
<component type="Documents" context="System">
<displayName>All .mp3 files to My Documents</displayName>
@ -88,7 +88,7 @@ The following custom .xml file reroutes .mp3 files located in the fixed drives o
The following custom .xml file migrates the Sample.doc file from C:\\EngineeringDrafts into the My Documents folder of every user. %CSIDL\_PERSONAL% is the virtual folder representing the My Documents desktop item, which is equivalent to CSIDL\_MYDOCUMENTS.
``` syntax
```xml
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
<component type="Documents" context="User">
<displayName>Sample.doc into My Documents</displayName>

View File

@ -138,7 +138,7 @@ Syntax:
The following example is from the MigApp.xml file:
``` syntax
```xml
<addObjects>
<object>
<location type="Registry">%HklmWowSoftware%\Microsoft\Office\12.0\Common\Migration\Office [UpgradeVersion]</location>
@ -212,7 +212,7 @@ Syntax:
The following example is from the MigApp.xml file:
``` syntax
```xml
<object>
<location type="Registry">%HklmWowSoftware%\Microsoft\Office\12.0\Common\Migration\Office [Lang]</location>
<attributes>DWORD</attributes>
@ -275,7 +275,7 @@ Syntax:
The following example is from the MigApp.xml file:
``` syntax
```xml
<object>
<location type="Registry">%HklmWowSoftware%\Microsoft\Office\12.0\Common\Migration\Office [Lang]</location>
<attributes>DWORD</attributes>
@ -455,7 +455,7 @@ For example,
In the code sample below, the &lt;condition&gt; elements, A and B, are joined together by the AND operator because they are in separate &lt;conditions&gt; sections. For example:
``` syntax
```xml
<detection>
<conditions>
<condition>A</condition>
@ -468,7 +468,7 @@ In the code sample below, the &lt;condition&gt; elements, A and B, are joined to
However, in the code sample below, the &lt;condition&gt; elements, A and B, are joined together by the OR operator because they are in the same &lt;conditions&gt; section.
``` syntax
```xml
<detection>
<conditions>
<condition>A</condition>
@ -826,7 +826,7 @@ For example:
~~~
For example:
``` syntax
```xml
<condition negation="Yes">MigXmlHelper.DoesStringContentEqual("File","%USERNAME%","")</condition>
```
~~~
@ -914,7 +914,7 @@ For example:
~~~
For example:
``` syntax
```xml
<objectSet>
<condition negation="Yes">MigXmlHelper.IsSameObject("File","%CSIDL_FAVORITES%","%CSIDL_COMMON_FAVORITES%")</condition>
<pattern type="File">%CSIDL_FAVORITES%\* [*]</pattern>
@ -1055,7 +1055,7 @@ Syntax:
The following example is from the MigApp.xml file:
``` syntax
```xml
<environment name="GlobalEnv">
<conditions>
<condition negation="Yes">MigXmlHelper.IsNative64Bit()</condition>
@ -1152,13 +1152,13 @@ The following functions generate patterns out of the content of an object. These
~~~
For example:
``` syntax
```xml
<content filter="MigXmlHelper.ExtractSingleFile(',','%system%')">
```
and
``` syntax
```xml
<content filter="MigXmlHelper.ExtractSingleFile(NULL,'%CSIDL_COMMON_FONTS%')">
```
~~~
@ -1243,7 +1243,7 @@ and
~~~
For example:
``` syntax
```xml
<objectSet>
<content filter='MigXmlHelper.ExtractDirectory (NULL, "1")'>
<objectSet>
@ -1365,7 +1365,7 @@ The following functions change the content of objects as they are migrated. Thes
~~~
For example:
``` syntax
```xml
<contentModify script="MigXmlHelper.ConvertToString('1')">
<objectSet>
<pattern type="Registry">HKCU\Control Panel\Desktop [ScreenSaveUsePassword]</pattern>
@ -1622,7 +1622,7 @@ Syntax:
The following code sample shows how the &lt;description&gt; element defines the "My custom component" description.:
``` syntax
```xml
<description>My custom component<description>
```
@ -1677,7 +1677,7 @@ Syntax:
For example:
``` syntax
```xml
<destinationCleanup>
<objectSet>
<pattern type="Registry">HKCU\Software\Lotus\123\99.0\DDE Preferences\* [*]</pattern>
@ -1807,7 +1807,7 @@ Syntax:
The following example is from the MigApp.xml file.
``` syntax
```xml
<detects>
<detect>
<condition>MigXmlHelper.DoesFileVersionMatch("%Lotus123InstPath%\123w.exe","ProductVersion","9.*")</condition>
@ -1878,7 +1878,7 @@ Syntax:
For example:
``` syntax
```xml
<detection name="AdobePhotoshopCS">
<conditions>
<condition>MigXmlHelper.DoesObjectExist("Registry","HKCU\Software\Adobe\Photoshop\8.0")</condition>
@ -1889,7 +1889,7 @@ For example:
and
``` syntax
```xml
<role role="Settings">
<detection>
<conditions>
@ -1945,7 +1945,7 @@ Syntax:
For example:
``` syntax
```xml
<displayName>Command Prompt settings</displayName>
```
@ -2012,7 +2012,7 @@ Syntax:
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:
``` syntax
```xml
<environment>
<variable name="INSTALLPATH">
<script>MigXmlHelper.GetStringContent("Registry","\software\companyname\install [path]")</script>
@ -2022,7 +2022,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 [&lt;script&gt; functions](#scriptfunctions) to perform similar tasks.
``` syntax
```xml
<include>
<objectSet>
<pattern type="File">%INSTALLPATH%\ [*.xyz]</pattern>
@ -2032,7 +2032,7 @@ Then you can use an include rule as follows. You can use any of the [&lt;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\].
``` syntax
```xml
<environment>
<variable name="APPPATH">
<objectSet>
@ -2050,7 +2050,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 &lt;include&gt; rule in an .xml file:
``` syntax
```xml
<include>
<objectSet>
<pattern type="File">%SYSTEMDRIVE%\data\userdata\dir1\dir2 [File1.txt]</pattern>
@ -2064,7 +2064,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:
``` syntax
```xml
<environment>
<variable name="DATAPATH">
<text>%SYSTEMDRIVE%\data\userdata\dir1\dir2 </text>
@ -2074,7 +2074,7 @@ Instead of typing the path five times, you can create a variable for the locatio
Then, you can specify the variable in an &lt;include&gt; rule as follows:
``` syntax
```xml
<include>
<objectSet>
<pattern type="File">%DATAPATH% [File1.txt]</pattern>
@ -2133,7 +2133,7 @@ Syntax:
For example, from the MigUser.xml file:
``` syntax
```xml
<exclude>
<objectSet>
<pattern type="File">%CSIDL_MYMUSIC%\* [*]</pattern>
@ -2190,7 +2190,7 @@ Syntax:
Example:
``` syntax
```xml
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/miguser">
<!-- This component migrates My Video files -->
<component type="System" context="System">
@ -2297,7 +2297,7 @@ Syntax:
For example, if you want to migrate all \*.doc files from the source computer, specifying the following code under the &lt;component&gt; element:
``` syntax
```xml
<extensions>
<extension>doc</extension>
<extensions>
@ -2305,7 +2305,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 &lt;rules&gt; element:
``` syntax
```xml
<include>
<objectSet>
<script>MigXmlHelper.GenerateDrivePatterns ("* [*.doc]", "Fixed")</script>
@ -2418,7 +2418,7 @@ Syntax:
The following example is from the MigUser.xml file:
``` syntax
```xml
<component type="Documents" context="User">
<displayName _locID="miguser.myvideo">My Video</displayName>
<paths>
@ -2501,7 +2501,7 @@ The following functions return a Boolean value. You can use them to migrate cert
For example:
``` syntax
```xml
<include filter='MigXmlHelper.IgnoreIrrelevantLinks()'>
<objectSet>
<pattern type="File">%CSIDL_COMMON_VIDEO%\* [*]</pattern>
@ -2517,7 +2517,7 @@ The following functions return a Boolean value. You can use them to migrate cert
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:
``` syntax
```xml
<include filter="MigXmlHelper.NeverRestore()">
<objectSet>
<pattern type="Registry">HKCU\Control Panel\International [Locale]</pattern>
@ -2634,7 +2634,7 @@ Syntax:
The following example is from the MigApp.xml file:
``` syntax
```xml
<addObjects>
<object>
<location type="Registry">%HklmWowSoftware%\Microsoft\Office\12.0\Common\Migration\Office [UpgradeVersion]</location>
@ -2695,7 +2695,7 @@ Syntax:
The following example is from the MigApp.xml file:
``` syntax
```xml
<locationModify script="MigXmlHelper.RelativeMove('%CSIDL_APPDATA%\Microsoft\Office','%CSIDL_APPDATA%')">
<objectSet>
<pattern type="File">%CSIDL_APPDATA%\Microsoft\Office\ [Access10.pip]</pattern>
@ -2740,7 +2740,7 @@ The following functions change the location of objects as they are migrated when
~~~
For example:
``` syntax
```xml
<locationModify script="MigXmlHelper.ExactMove('HKCU\Keyboard Layout\Toggle [HotKey]')">
<objectSet>
<pattern type="Registry">HKCU\Keyboard Layout\Toggle []</pattern>
@ -2817,7 +2817,7 @@ For example:
~~~
For example:
``` syntax
```xml
<include>
<objectSet>
<pattern type="File">%CSIDL_COMMON_FAVORITES%\* [*]</pattern>
@ -2923,7 +2923,7 @@ Syntax:
The following example is from the MigUser.xml file:
``` syntax
```xml
<rules>
<include filter='MigXmlHelper.IgnoreIrrelevantLinks()'>
<objectSet>
@ -2948,7 +2948,7 @@ These functions control how collisions are resolved.
For example:
``` syntax
```xml
<merge script="MigXmlHelper.DestinationPriority()">
<objectSet>
<pattern type="Registry">HKCU\Software\Microsoft\Office\9.0\PhotoDraw\ [MyPictures]</pattern>
@ -3037,7 +3037,7 @@ These functions control how collisions are resolved.
For example:
``` syntax
```xml
<merge script="MigXmlHelper.SourcePriority()">
<objectSet>
<pattern type="Registry">%HklmWowSoftware%\Microsoft\Office\12.0\Common\Migration\Publisher [UpgradeVersion]</pattern>
@ -3097,7 +3097,7 @@ Syntax:
The following example is from the MigApp.xml file:
``` syntax
```xml
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/migapp">
</migration>
```
@ -3138,7 +3138,7 @@ This filter helper function can be used to filter the migration of files based o
``` syntax
```xml
<component context="System" type="Application">
<displayName>File_size</displayName>
<role role="Data">
@ -3194,7 +3194,7 @@ Syntax:
The following example is from the MigApp.xml file:
``` syntax
```xml
<addObjects>
<object>
<location type="Registry">%HklmWowSoftware%\Microsoft\Office\12.0\Common\Migration\Office [UpgradeVersion]</location>
@ -3230,7 +3230,7 @@ Syntax:
The following example is from the MigUser.xml file:
``` syntax
```xml
<component type="Documents" context="User">
<displayName _locID="miguser.mymusic">My Music</displayName>
<paths>
@ -3273,7 +3273,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 &lt;pattern&gt; elements for each &lt;objectSet&gt; element and they will be combined. If you are specifying files, you may want to use GenerateDrivePatterns with &lt;script&gt; instead. GenerateDrivePatterns is basically the same as a &lt;pattern&gt; rule, without the drive letter specification. For example, the following two lines of code are similar:
``` syntax
```xml
<pattern type="File">C:\Folder\* [Sample.doc]</pattern>
<script>MigXmlHelper.GenerateDrivePatterns("\Folder\* [Sample.doc]","Fixed"</script>
```
@ -3336,13 +3336,13 @@ For example:
- To migrate a single registry key:
``` syntax
```xml
<pattern type="Registry">HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache [Persistent]</pattern>
```
- To migrate the EngineeringDrafts folder and any subfolders from the C: drive:
``` syntax
```xml
<pattern type="File">C:\EngineeringDrafts\* [*]</pattern>
```
@ -3352,13 +3352,13 @@ For example:
- To migrate the Sample.doc file from C:\\EngineeringDrafts:
``` syntax
```xml
<pattern type="File"> C:\EngineeringDrafts\ [Sample.doc]</pattern>
```
- 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.
``` syntax
```xml
<pattern type="File"> C:\* [Sample.doc] </pattern>
```
@ -3484,7 +3484,7 @@ Syntax:
The following example is from the MigUser.xml file. For more examples, see the MigApp.xml file:
``` syntax
```xml
<component type="System" context="User">
<displayName _locID="miguser.startmenu">Start Menu</displayName>
<paths>
@ -3571,7 +3571,7 @@ Syntax:
The following example is from the MigUser.xml file:
``` syntax
```xml
<component type="Documents" context="User">
<displayName _locID="miguser.mymusic">My Music</displayName>
<paths>
@ -3679,7 +3679,7 @@ Examples:
To migrate the Sample.doc file from any drive on the source computer, use &lt;script&gt; as follows. If multiple files exist with the same name, all such files will get migrated.
``` syntax
```xml
<script>MigXmlHelper.GenerateDrivePatterns("* [sample.doc]", "Fixed")</script>
```
@ -3744,7 +3744,7 @@ These functions return either a string or a pattern.
~~~
For example:
``` syntax
```xml
<variable name="MSNMessengerInstPath">
<script>MigXmlHelper.GetStringContent("Registry","%HklmWowSoftware%\Microsoft\MSNMessenger [InstallationDirectory]")</script>
</variable>
@ -3849,7 +3849,7 @@ If GenerateUserPattens('File','%userprofile% \[\*.doc\]','FALSE') is called whil
The following is example code for this scenario. The first &lt;rules&gt; element migrates all.doc files on the source computer with the exception of those inside C:\\Documents and Settings. The second &lt;rules&gt; 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 &lt;rules&gt; 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.
``` syntax
```xml
<rules context="System">
<include>
<objectSet>
@ -3915,7 +3915,7 @@ This helper function invokes the document finder to scan the system for all file
``` syntax
```xml
<!-- This component migrates data in user context -->
<component type="Documents" context="User">
<displayName>MigDocUser</displayName>
@ -3942,7 +3942,7 @@ 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:
``` syntax
```xml
<processing when="apply-success">
<script>MigXmlHelper.AskForLogoff()</script>
</processing>
@ -3952,7 +3952,7 @@ The following scripts have no return value. You can use the following errors wit
- **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:
``` syntax
```xml
<processing when="pre-apply">
<script>MigXmlHelper.KillExplorer()</script>
</processing>
@ -3960,7 +3960,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:
``` syntax
```xml
<processing when="apply-success">
<script>MigXmlHelper.RegisterFonts("%CSIDL_COMMON_FONTS%")</script>
</processing>
@ -3970,7 +3970,7 @@ The following scripts have no return value. You can use the following errors wit
- **RestartExplorer().** Restarts Explorer.exe at the end of the migration. For example:
``` syntax
```xml
<processing when="post-apply">
<script>MigXmlHelper.RestartExplorer()</script>
</processing>
@ -4020,7 +4020,7 @@ Syntax:
For example:
``` syntax
```xml
<variable name="QuickTime5or6DataSys">
<text>%CSIDL_COMMON_APPDATA%\QuickTime</text>
</variable>
@ -4045,7 +4045,7 @@ Syntax:
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).
``` syntax
```xml
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/excludefiles">
<component context="System" type="Documents">
<displayName>Test</displayName>
@ -4116,7 +4116,7 @@ Syntax:
The following example is from the MigApp.xml file:
``` syntax
```xml
<environment>
<variable name="HklmWowSoftware">
<text>HKLM\Software</text>
@ -4168,7 +4168,7 @@ Syntax:
For example:
``` syntax
```xml
<version>4.*</version>
```

View File

@ -20,20 +20,20 @@ When creating custom .xml files, note the following requirements:
- **The file must be in Unicode Transformation Format-8 (UTF-8).** You must save the file in this format, and you must specify the following syntax at the beginning of each .xml file:
``` syntax
```xml
<?xml version="1.0" encoding="UTF-8"?>
```
- **The file must have a unique migration urlid**. The urlid of each file that you specify on the command line must be different. If two migration .xml files have the same urlid, the second .xml file that is specified on the command line will not be processed. This is because USMT uses the urlid to define the components within the file. For example, you must specify the following syntax at the beginning of each file:
``` syntax
```xml
<?xml version="1.0" encoding="UTF-8"?>
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/<CustomFileName>">
```
- **Each component in the file must have a display name in order for it to appear in the Config.xml file.** This is because the Config.xml file defines the components by the display name and the migration urlid. For example, specify the following syntax:
``` syntax
```xml
<displayName>My Application</displayName>
```