mirror of
https://github.com/MicrosoftDocs/windows-itpro-docs.git
synced 2025-05-13 05:47:23 +00:00
* Update windows/security/information-protection/windows-information-protection/testing-scenarios-for-wip.md Co-Authored-By: Trond B. Krokli <38162891+illfated@users.noreply.github.com> * Update windows/security/threat-protection/windows-defender-exploit-guard/enable-controlled-folders-exploit-guard.md Co-Authored-By: JohanFreelancer9 <48568725+JohanFreelancer9@users.noreply.github.com> * Update policy-csp-update.md In 1903 we deprecated the value of 32 and combined Semi-Annual Channel (Targeted) with the Semi-Annual Channel. We need to communicate this change in the documentation. * chore: Replace tab after unorderd list marker * Update windows/security/identity-protection/credential-guard/credential-guard-manage.md Co-Authored-By: Trond B. Krokli <38162891+illfated@users.noreply.github.com> * markdown syntex issue There was a syntex issue with formating. It has been fixed. * Update MDM Path https://docs.microsoft.com/en-us/windows/client-management/mdm/policy-csp-browser#browser-allowflash Issue https://github.com/MicrosoftDocs/windows-itpro-docs/issues/3553 * HTML Tag fix There was issue with HTML tag in live 203 and has been fixed. * Update windows/security/information-protection/windows-information-protection/testing-scenarios-for-wip.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/windows-defender-exploit-guard/enable-controlled-folders-exploit-guard.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/deployment/update/waas-overview.md Co-Authored-By: Trond B. Krokli <38162891+illfated@users.noreply.github.com> * Update waas-overview.md * Update hello-hybrid-cert-whfb-settings-policy.md removing extra "want" * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: JohanFreelancer9 <48568725+JohanFreelancer9@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: JohanFreelancer9 <48568725+JohanFreelancer9@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: JohanFreelancer9 <48568725+JohanFreelancer9@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: JohanFreelancer9 <48568725+JohanFreelancer9@users.noreply.github.com> * Update hello-planning-guide.md * Update windows/deployment/update/waas-delivery-optimization-reference.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/deployment/update/waas-delivery-optimization-reference.md Co-Authored-By: Trond B. Krokli <38162891+illfated@users.noreply.github.com> * Update whiteboard-collaboration.md * Update hello-key-trust-policy-settings.md * Update integrate-configuration-manager-with-mdt.md * Update use-system-center-configuration-manager-to-manage-devices-with-semm.md * Update start-layout-xml-desktop.md Added syntax and note * remove reference about Windows 10 Pro https://github.com/MicrosoftDocs/windows-itpro-docs/issues/3255 * Fixed Typo * Adding Question to FAQ https://github.com/MicrosoftDocs/windows-itpro-docs/issues/4288 * Adding Question to FAQ https://github.com/MicrosoftDocs/windows-itpro-docs/issues/4288 * Updated with TVM refs * Emphasize Device Sync https://github.com/MicrosoftDocs/windows-itpro-docs/issues/4401 * Update windows/security/threat-protection/windows-defender-atp/configure-mssp-support.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/windows-defender-atp/configure-mssp-support.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * fix: MD005/list-indent Inconsistent indentation for list items at the same level * Update integrate-configuration-manager-with-mdt.md * Update use-system-center-configuration-manager-to-manage-devices-with-semm.md * Update enable-admx-backed-policies-in-mdm.md Added two links to notes. * Update windows/configuration/start-layout-xml-desktop.md Co-Authored-By: JohanFreelancer9 <48568725+JohanFreelancer9@users.noreply.github.com> * Update index.md Corrected typo: 'annd' to 'and' * Update windows/security/identity-protection/hello-for-business/hello-planning-guide.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update devices/surface-hub/whiteboard-collaboration.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/identity-protection/hello-for-business/hello-key-trust-policy-settings.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/identity-protection/hello-for-business/hello-key-trust-policy-settings.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update windows/security/threat-protection/auditing/apply-a-basic-audit-policy-on-a-file-or-folder.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Create troubleshooting-agpm40-upgrades.md * Update TOC.md Addition of Troubleshooting AGPM Upgrades top-level link * Update windows-10-upgrade-paths.md * Update white-glove.md Removed a singular reference to WG and replaced with white glove * remove last 3 blocks in IT Admin * Fixes typo issue in line 47 Closes #4557 * Update metadata to replace non-existent author * Update index.md Typo - corrected 'Bitlocker' to 'BitLocker' * Rename windows/security/threat-protection/windows-defender-atp/configure-mssp-support.md to windows/security/threat-protection/microsoft-defender-atp/configure-mssp-support.md * Update hello-planning-guide.md * Update configure-wd-app-guard.md * Update configure-wd-app-guard.md * Update configure-wd-app-guard.md * Update kiosk-xml.md * Update kiosk-xml.md * Update waas-servicing-differences.md Removed double use of the word critical * Minor update to properly reflect supported macros * Update applocker-csp.md * Update kiosk-xml.md * Update applocker-csp.md * updated image needed I don't have rights to upload a new file (the updated error image) More details here: https://github.com/MicrosoftDocs/windows-itpro-docs/issues/2489 * MDOP May 2019 Servicing Release: new Hotfix Link Microsoft Desktop Optimization Pack May 2019 Servicing Release. Replaces the outdated MDOP link to July 2018 Servicing Release. Thanks to CaptainUnlikely for the Technet blogs information update. Closes #4574 * Creating a WDATP alert requires recommendedAction Otherwise the following will be returned by the API: ``` {"error":{"code":"BadRequest","message":"recommendedAction argument is missing"}} ``` * Update windows/security/threat-protection/windows-defender-application-guard/configure-wd-app-guard.md Co-Authored-By: JohanFreelancer9 <48568725+JohanFreelancer9@users.noreply.github.com> * Update guidelines-for-assigned-access-app.md * Corrected typo Changed "ConnecionSuccess" to "ConnectionSuccess * Update install-wd-app-guard.md * Update self-deploying.md Added additional links. * Update install-wd-app-guard.md * Update hello-hybrid-cert-trust-devreg.md * Update waas-delivery-optimization.md fixed typo * Fixed a small typo Changed "wwitches" to "switches". * Update for the month June 2019 I have added the content for surface hub based on an update KB4503289. There was no update released for a hub for the month of July. Problem: https://github.com/MicrosoftDocs/windows-itpro-docs/issues/4586 * Update devices/surface-hub/surface-hub-update-history.md Co-Authored-By: Trond B. Krokli <38162891+illfated@users.noreply.github.com> * typo typo the Action Sataus column instead of the Action Status column * Correcting small mistake on which version of Win10 displays MBEC Correcting initial mistake when changed docs. * Updated links Hotlink for configuring MTP integration and API support was missing and has been updated. Problem: https://github.com/MicrosoftDocs/windows-itpro-docs/issues/4569 * Resolves #4620 - typo in command line Issue #4620 Set-ProcesMitigation -Name c:\apps\lob\tests\testing.exe -Enable AuditDynamicCode should be Set-ProcessMitigation -Name c:\apps\lob\tests\testing.exe -Enable AuditDynamicCode * HTML to MarkDown in hello-hybrid-aadj-sso-cert.md This is a combined effort to alleviate a translation bug as well as improving the MarkDown codestyle in this document, both for the English (en-us) version of the document as well as the translated versions. This change should in theory close the issue tickets #3451 and #3453 after the scripted translation process has been re-run on this document. This solution is based on a user discussion in issue ticket #4589 . * Update windows/deployment/windows-autopilot/self-deploying.md Co-Authored-By: Nicole Turner <39884432+nenonix@users.noreply.github.com> * Update index.md * Update waas-configure-wufb.md * Update hello-features.md Removes \ typo * Update windows-analytics-get-started.md adding IE site discovery to GDPR blurb * Update sideload-apps-in-windows-10.md * Update upgrade-readiness-deployment-script.md replacing support email with official support channels * missing bold on GUI element * formatting again - italicize typed word * fixing warnings * restored missing art, somehow * CAT Auto Pulish for Windows Release Messages - CAT_AutoPublish_2019080917545405 (#881)
319 lines
11 KiB
Markdown
319 lines
11 KiB
Markdown
---
|
||
title: Custom XML Examples (Windows 10)
|
||
description: Custom XML Examples
|
||
ms.assetid: 48f441d9-6c66-43ef-91e9-7c78cde6fcc0
|
||
ms.reviewer:
|
||
manager: laurawi
|
||
ms.author: greglin
|
||
ms.prod: w10
|
||
ms.mktglfcycl: deploy
|
||
ms.sitesec: library
|
||
audience: itpro
|
||
author: greg-lindsay
|
||
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)
|
||
|
||
## <a href="" id="example"></a>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.
|
||
|
||
``` xml
|
||
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/migtestapp">
|
||
<component type="Application">
|
||
<!-- Name of the application -->
|
||
<displayName>Some Application</displayName>
|
||
<!-- Specify whether the environment variables exist in the context of user or system or both -->
|
||
<environment context="System">
|
||
<!-- Create the environment variables -->
|
||
<variable name="myVar1">
|
||
<!-- Simple text value assignment to a variable -->
|
||
<text>value</text>
|
||
</variable>
|
||
<variable name="myAppExePath">
|
||
<!-- Make a call to in-built helper function to get a value from a reg key and assign that value to the variable -->
|
||
<script>MigXMLHelper.GetStringContent("Registry","HKLM\Software\MyApp\Installer [EXEPATH]")</script>
|
||
</variable>
|
||
</environment>
|
||
<role role="Settings">
|
||
<detects>
|
||
<!-- All of these checks must be true for the component to be detected -->
|
||
<detect>
|
||
<!-- Make a call to in-built helper function to check if an object exists or not -->
|
||
<condition>MigXMLHelper.DoesObjectExist("Registry","HKLM\Software\MyApp [win32_version]")</condition>
|
||
</detect>
|
||
<detect>
|
||
<!-- Either of these checks must be true for the component to be detected -->
|
||
<!-- Make a call to in-built helper function to check if a file version matches or not -->
|
||
<condition>MigXMLHelper.DoesFileVersionMatch("%MyAppExePath%","ProductVersion","8.*")</condition>
|
||
<condition>MigXMLHelper.DoesFileVersionMatch("%MyAppExePath%","ProductVersion","9.*")</condition>
|
||
</detect>
|
||
</detects>
|
||
<!-- Describe the rules that will be executed during migration of this component and the context, whether user, system or both -->
|
||
<rules context="User">
|
||
<!-- Delete objects specified in the object set on the destination computer before applying source objects -->
|
||
<destinationCleanup>
|
||
<!-- Describe the pattern for the list of objects to be deleted -->
|
||
<objectSet>
|
||
<pattern type="Registry">HKCU\Software\MyApp\Toolbar\* [*]</pattern>
|
||
<pattern type="Registry">HKCU\Software\MyApp\ListView\* [*]</pattern>
|
||
<pattern type="Registry">HKCU\Software\MyApp [ShowTips]</pattern>
|
||
</objectSet>
|
||
</destinationCleanup>
|
||
<!-- Specify which set of objects should be migrated -->
|
||
<include>
|
||
<!-- Describe the pattern for the list of objects to be included -->
|
||
<objectSet>
|
||
<pattern type="Registry">HKCU\Software\MyApp\Toolbar\* [*]</pattern>
|
||
<pattern type="Registry">HKCU\Software\MyApp\ListView\* [*]</pattern>
|
||
<pattern type="Registry">HKCU\Software\MyApp [ShowTips]</pattern>
|
||
</objectSet>
|
||
</include>
|
||
<!-- Specify which set of objects should not be migrated -->
|
||
<exclude>
|
||
<!-- Describe the pattern for the list of objects to be excluded from migration -->
|
||
<objectSet>
|
||
<pattern type="Registry">HKCU\Software\MyApp [Display]</pattern>
|
||
</objectSet>
|
||
</exclude>
|
||
</rules>
|
||
</role>
|
||
</component>
|
||
</migration>
|
||
```
|
||
|
||
## <a href="" id="example2"></a>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.
|
||
|
||
<table>
|
||
<colgroup>
|
||
<col width="50%" />
|
||
<col width="50%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="header">
|
||
<th align="left">Code</th>
|
||
<th align="left">Behavior</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="odd">
|
||
<td align="left"><pre class="syntax" space="preserve"><code><condition>MigXmlHelper.DoesObjectExist("File","%CSIDL_MYVIDEO%")</condition></code></pre></td>
|
||
<td align="left"><p>Verifies that My Videos exists on the source computer.</p></td>
|
||
</tr>
|
||
<tr class="even">
|
||
<td align="left"><pre class="syntax" space="preserve"><code><include filter='MigXmlHelper.IgnoreIrrelevantLinks()'></code></pre></td>
|
||
<td align="left"><p>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.</p></td>
|
||
</tr>
|
||
<tr class="odd">
|
||
<td align="left"><pre class="syntax" space="preserve"><code><pattern type="File">%CSIDL_MYVIDEO%* [*]</pattern></code></pre></td>
|
||
<td align="left"><p>Migrates My Videos for all users.</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
```xml
|
||
<?xml version="1.0" encoding="UTF-8"?>
|
||
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/CustomFile">
|
||
<component type="Documents" context="User">
|
||
<displayName>My Video</displayName>
|
||
<role role="Data">
|
||
<detects>
|
||
<detect>
|
||
<condition>MigXmlHelper.DoesObjectExist("File","%CSIDL_MYVIDEO%")</condition>
|
||
</detect>
|
||
</detects>
|
||
<rules>
|
||
<include filter='MigXmlHelper.IgnoreIrrelevantLinks()'>
|
||
<objectSet>
|
||
<pattern type="File">%CSIDL_MYVIDEO%\* [*]</pattern>
|
||
</objectSet>
|
||
</include>
|
||
</rules>
|
||
</role>
|
||
</component>
|
||
</migration>
|
||
```
|
||
|
||
## <a href="" id="example3"></a>Example 3: Migrating Files and Registry Keys
|
||
|
||
|
||
This table describes the behavior in the following example .xml file.
|
||
|
||
<table>
|
||
<colgroup>
|
||
<col width="50%" />
|
||
<col width="50%" />
|
||
</colgroup>
|
||
<thead>
|
||
<tr class="header">
|
||
<th align="left">Code</th>
|
||
<th align="left">Behavior</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="odd">
|
||
<td align="left"><pre class="syntax" space="preserve"><code><pattern type="File">%ProgramFiles%\USMTTestFolder* [USMTTestFile.txt]</pattern></code></pre></td>
|
||
<td align="left"><p>Migrates all instances of the file Usmttestfile.txt from all sub-directories under %ProgramFiles%\USMTTestFolder.</p></td>
|
||
</tr>
|
||
<tr class="even">
|
||
<td align="left"><pre class="syntax" space="preserve"><code><pattern type="File">%ProgramFiles%\USMTDIRTestFolder* [<em>]</pattern></code></pre></td>
|
||
<td align="left"><p>Migrates the whole directory under %ProgramFiles%\USMTDIRTestFolder.</p></td>
|
||
</tr>
|
||
<tr class="odd">
|
||
<td align="left"><pre class="syntax" space="preserve"><code><pattern type="Registry">HKCU\Software\USMTTESTKEY* [MyKey]</pattern></code></pre></td>
|
||
<td align="left"><p>Migrates all instances of MyKey under HKCU\Software\USMTTESTKEY.</p></td>
|
||
</tr>
|
||
<tr class="even">
|
||
<td align="left"><pre class="syntax" space="preserve"><code><pattern type="Registry">HKLM\Software\USMTTESTKEY* [</em>]</pattern></code></pre></td>
|
||
<td align="left"><p>Migrates the entire registry hive under HKLM\Software\USMTTESTKEY.</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
|
||
``` xml
|
||
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/testfilemig">
|
||
<component type="Application" context="System">
|
||
<displayName>File Migration Test</displayName>
|
||
<role role="Data">
|
||
<rules context="System">
|
||
<include>
|
||
<objectSet>
|
||
<pattern type="File">%ProgramFiles%\USMTTestFolder\* [USMTTestFile.txt]</pattern>
|
||
<pattern type="File">%ProgramFiles%\USMTDIRTestFolder\* [*]</pattern>
|
||
</objectSet>
|
||
</include>
|
||
</rules>
|
||
</role>
|
||
</component>
|
||
<component type="System">
|
||
<displayName>Registry Migration Test</displayName>
|
||
<role role="Settings">
|
||
<rules context="UserAndSystem">
|
||
<include>
|
||
<objectSet>
|
||
<pattern type="Registry">HKCU\Software\USMTTESTKEY\* [MyKey]</pattern>
|
||
<pattern type="Registry">HKLM\Software\USMTTESTKEY\* [*]</pattern>
|
||
</objectSet>
|
||
</include>
|
||
</rules>
|
||
</role>
|
||
</component>
|
||
</migration>
|
||
```
|
||
|
||
## <a href="" id="example4"></a>Example 4: Migrating Specific Folders from Various Locations
|
||
|
||
|
||
The behavior for this custom .xml file is described within the <`displayName`> tags in the code.
|
||
|
||
``` xml
|
||
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
|
||
|
||
<component type="Documents" context="System">
|
||
<displayName>Component to migrate all Engineering Drafts subfolders without documents in this folder </displayName>
|
||
<role role="Data">
|
||
<rules>
|
||
<include>
|
||
<objectSet>
|
||
<pattern type="File"> C:\EngineeringDrafts\* [*]</pattern>
|
||
</objectSet>
|
||
</include>
|
||
<exclude>
|
||
<objectSet>
|
||
<pattern type="File"> C:\EngineeringDrafts\ [*]</pattern>
|
||
</objectSet>
|
||
</exclude>
|
||
</rules>
|
||
</role>
|
||
</component>
|
||
|
||
<component type="Documents" context="System">
|
||
<displayName>Component to migrate all user documents except Sample.doc</displayName>
|
||
<role role="Data">
|
||
<rules>
|
||
<include>
|
||
<objectSet>
|
||
<pattern type="File"> C:\UserDocuments\* [*]</pattern>
|
||
</objectSet>
|
||
</include>
|
||
<exclude>
|
||
<objectSet>
|
||
<pattern type="File"> C:\UserDocuments\ [Sample.doc]</pattern>
|
||
</objectSet>
|
||
</exclude>
|
||
</rules>
|
||
</role>
|
||
</component>
|
||
|
||
<component type="Documents" context="System">
|
||
<displayName>Component to migrate all Requests folders on any drive on the computer </displayName>
|
||
<role role="Data">
|
||
<rules>
|
||
<include>
|
||
<objectSet>
|
||
<script>MigXmlHelper.GenerateDrivePatterns ("\Requests\* [*] ", "Fixed")</script>
|
||
<script>MigXmlHelper.GenerateDrivePatterns ("*\Requests\* [*] ", "Fixed")</script>
|
||
</objectSet>
|
||
</include>
|
||
</rules>
|
||
</role>
|
||
</component>
|
||
|
||
<component type="Documents" context="System">
|
||
<displayName>Component to migrate all Presentations folder from any location on the C: drive </displayName>
|
||
<role role="Data">
|
||
<rules>
|
||
<include>
|
||
<objectSet>
|
||
<pattern type="File"> C:\*\Presentations\* [*]</pattern>
|
||
<pattern type="File"> C:\Presentations\* [*]</pattern>
|
||
</objectSet>
|
||
</include>
|
||
</rules>
|
||
</role>
|
||
</component>
|
||
</migration>
|
||
```
|
||
|
||
## Related topics
|
||
|
||
|
||
[USMT XML Reference](usmt-xml-reference.md)
|
||
|
||
[Customize USMT XML Files](usmt-customize-xml-files.md)
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|