mirror of
https://github.com/MicrosoftDocs/windows-itpro-docs.git
synced 2025-06-15 10:23:37 +00:00
fix: Replace syntax with langauge code 2
This commit is contained in:
@ -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 <condition> elements, A and B, are joined together by the AND operator because they are in separate <conditions> sections. For example:
|
||||
|
||||
``` syntax
|
||||
```xml
|
||||
<detection>
|
||||
<conditions>
|
||||
<condition>A</condition>
|
||||
@ -468,7 +468,7 @@ In the code sample below, the <condition> elements, A and B, are joined to
|
||||
|
||||
However, in the code sample below, the <condition> elements, A and B, are joined together by the OR operator because they are in the same <conditions> section.
|
||||
|
||||
``` 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 <description> 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 [<script> 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 [<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 <include> 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 <include> 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 <component> 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 <rules> 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 <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:
|
||||
|
||||
``` 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 <script> 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 <rules> element migrates all.doc files on the source computer with the exception of those inside C:\\Documents and Settings. The second <rules> elements will migrate all .doc files from C:\\Documents and Settings with the exception of the .doc files in the profiles of the other users. Because the second <rules> element will be processed in each migrated user context, the end result will be the desired behavior. The end result is the one we expected.
|
||||
|
||||
``` 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>
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user