diff --git a/windows/deployment/usmt/usmt-custom-xml-examples.md b/windows/deployment/usmt/usmt-custom-xml-examples.md index f36bfa0d02..7d31c9bdbb 100644 --- a/windows/deployment/usmt/usmt-custom-xml-examples.md +++ b/windows/deployment/usmt/usmt-custom-xml-examples.md @@ -15,19 +15,6 @@ ms.topic: article # Custom XML Examples -**Note**   -Because the tables in this topic are wide, you may need to adjust the width of its window. - -## In This Topic: - -- [Example 1: Migrating an Unsupported Application](#example) - -- [Example 2: Migrating the My Videos Folder](#example2) - -- [Example 3: Migrating Files and Registry Keys](#example3) - -- [Example 4: Migrating Specific Folders from Various Locations](#example4) - ## Example 1: Migrating an Unsupported Application 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. @@ -98,13 +85,23 @@ The following is a template for the sections that you need to migrate your appli ## Example 2: Migrating the My Videos Folder -The following is a custom .xml file named CustomFile.xml that migrates My Videos for all users, if the folder exists on the source computer. +The following sample is a custom .xml file named CustomFile.xml that migrates My Videos for all users, if the folder exists on the source computer. -| Code | Behavior | -|------|----------| -|
<condition>MigXmlHelper.DoesObjectExist("File","%CSIDL_MYVIDEO%")</condition>
| Verifies that My Videos exists on the source computer. | -|
<include filter='MigXmlHelper.IgnoreIrrelevantLinks()'>
| Filters out the shortcuts in My Videos that do not resolve on the destination computer. This has no effect on files that are not shortcuts. For example, if there is a shortcut in My Videos on the source computer that points to C:\Folder1, that shortcut will be migrated only if C:\Folder1 exists on the destination computer. However, all other files, such as .mp3 files, migrate without any filtering. | -|
<pattern type="File">%CSIDL_MYVIDEO%* [*]</pattern>
| Migrates My Videos for all users. | +- **Sample condition**: Verifies that My Videos exists on the source computer: + + `MigXmlHelper.DoesObjectExist("File","%CSIDL_MYVIDEO%")` + +- **Sample filter**: Filters out the shortcuts in My Videos that do not resolve on the destination computer: + + `` + + This has no effect on files that are not shortcuts. For example, if there is a shortcut in My Videos on the source computer that points to C:\Folder1, that shortcut will be migrated only if C:\Folder1 exists on the destination computer. However, all other files, such as .mp3 files, migrate without any filtering. + +- **Sample pattern**: Migrates My Videos for all users: + + `%CSIDL_MYVIDEO%* [*]` + +**XML file** ```xml @@ -131,14 +128,25 @@ The following is a custom .xml file named CustomFile.xml that migrates My Videos ## Example 3: Migrating Files and Registry Keys -This table describes the behavior in the following example .xml file. +The sample patterns describe the behavior in the following example .xml file. -| Code | Behavior | -|------|----------| -|
<pattern type="File">%ProgramFiles%\USMTTestFolder* [USMTTestFile.txt]</pattern>
| Migrates all instances of the file Usmttestfile.txt from all sub-directories under %ProgramFiles%\USMTTestFolder. | -|
<pattern type="File">%ProgramFiles%\USMTDIRTestFolder* []</pattern>
| Migrates the whole directory under %ProgramFiles%\USMTDIRTestFolder. | -|
<pattern type="Registry">HKCU\Software\USMTTESTKEY* [MyKey]</pattern>
| Migrates all instances of MyKey under HKCU\Software\USMTTESTKEY. | -|
<pattern type="Registry">HKLM\Software\USMTTESTKEY* []</pattern>
| Migrates the entire registry hive under HKLM\Software\USMTTESTKEY. | +- **Sample pattern**: Migrates all instances of the file Usmttestfile.txt from all sub-directories under `%ProgramFiles%\USMTTestFolder`: + + `%ProgramFiles%\USMTTestFolder* [USMTTestFile.txt]` + +- **Sample pattern**: Migrates the whole directory under `%ProgramFiles%\USMTDIRTestFolder`: + + `%ProgramFiles%\USMTDIRTestFolder* []` + +- **Sample pattern**: Migrates all instances of MyKey under `HKCU\Software\USMTTESTKEY`: + + `HKCU\Software\USMTTESTKEY* [MyKey]` + +- **Sample pattern**: Migrates the entire registry hive under `HKLM\Software\USMTTESTKEY`: + + `HKLM\Software\USMTTESTKEY* []` + +**XML file** ``` xml @@ -174,7 +182,7 @@ This table describes the behavior in the following example .xml file. ## Example 4: Migrating Specific Folders from Various Locations -The behavior for this custom .xml file is described within the <`displayName`> tags in the code. +The behavior for this custom .xml file is described within the `` tags in the code. ``` xml @@ -201,12 +209,12 @@ The behavior for this custom .xml file is described within the <`displayName` Component to migrate all user documents except Sample.doc - + C:\UserDocuments\* [*] - + C:\UserDocuments\ [Sample.doc] @@ -221,9 +229,9 @@ The behavior for this custom .xml file is described within the <`displayName` - - - + + + @@ -235,8 +243,8 @@ The behavior for this custom .xml file is described within the <`displayName` - C:\*\Presentations\* [*] - C:\Presentations\* [*] + C:\*\Presentations\* [*] + C:\Presentations\* [*]