mirror of
https://github.com/MicrosoftDocs/windows-itpro-docs.git
synced 2025-05-12 21:37:22 +00:00
Additional grammar and style updates
Additional grammar and style updates
This commit is contained in:
parent
bdee5a0a4c
commit
1f0dcca9ce
@ -5,14 +5,14 @@ manager: aaroncz
|
|||||||
ms.author: frankroj
|
ms.author: frankroj
|
||||||
ms.prod: windows-client
|
ms.prod: windows-client
|
||||||
author: frankroj
|
author: frankroj
|
||||||
ms.date: 11/01/2022
|
ms.date: 09/18/2023
|
||||||
ms.topic: article
|
ms.topic: article
|
||||||
ms.technology: itpro-deploy
|
ms.technology: itpro-deploy
|
||||||
---
|
---
|
||||||
|
|
||||||
# Exclude files and settings
|
# Exclude files and settings
|
||||||
|
|
||||||
When you specify the migration .xml files, `MigApp.xml`, `MigDocs.xml`, and `MigUser.xml`, the User State Migration Tool (USMT) 10.0 migrates the settings and components listed, as discussed in [What does USMT migrate?](usmt-what-does-usmt-migrate.md) You can create a custom .xml file to further specify what to include or exclude in the migration. In addition you can create a `Config.xml` file to exclude an entire component from a migration. You can't, however, exclude users by using the migration .xml files or the `Config.xml` file. The only way to specify which users to include and exclude is by using the user options on the command line in the ScanState tool. For more information, see the [User options](usmt-scanstate-syntax.md#user-options) section of the [ScanState syntax](usmt-scanstate-syntax.md) article.
|
When you specify the migration .xml files, `MigApp.xml`, `MigDocs.xml`, and `MigUser.xml`, the User State Migration Tool (USMT) 10.0 migrates the settings and components listed, as discussed in [What does USMT migrate?](usmt-what-does-usmt-migrate.md) You can create a custom .xml file to further specify what to include or exclude in the migration. In addition, you can create a `Config.xml` file to exclude an entire component from a migration. You can't, however, exclude users by using the migration .xml files or the `Config.xml` file. The only way to specify which users to include and exclude is by using the user options on the command line in the ScanState tool. For more information, see the [User options](usmt-scanstate-syntax.md#user-options) section of the [ScanState syntax](usmt-scanstate-syntax.md) article.
|
||||||
|
|
||||||
Methods to customize the migration and include and exclude files and settings include:
|
Methods to customize the migration and include and exclude files and settings include:
|
||||||
|
|
||||||
@ -33,7 +33,8 @@ We recommend that you create a custom .xml file instead of modifying the default
|
|||||||
The migration .xml files, `MigApp.xml`, `MigDocs.xml`, and `MigUser.xml`, contain the **<component>** element, which typically represents a self-contained component or an application such as Microsoft® Office Outlook® and Word. To exclude the files and registry settings that are associated with these components, use the **<include>** and **<exclude>** elements. For example, you can use these elements to migrate all files and settings with pattern X except files and settings with pattern Y, where Y is more specific than X. For the syntax of these elements, see [USMT XML Reference](usmt-xml-reference.md).
|
The migration .xml files, `MigApp.xml`, `MigDocs.xml`, and `MigUser.xml`, contain the **<component>** element, which typically represents a self-contained component or an application such as Microsoft® Office Outlook® and Word. To exclude the files and registry settings that are associated with these components, use the **<include>** and **<exclude>** elements. For example, you can use these elements to migrate all files and settings with pattern X except files and settings with pattern Y, where Y is more specific than X. For the syntax of these elements, see [USMT XML Reference](usmt-xml-reference.md).
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> If you specify an **<exclude>** rule, always specify a corresponding **<include>** rule. Otherwise, if you do not specify an **<include>** rule, the specific files or settings will not be included. They will already be excluded from the migration. Thus, an unaccompanied **<exclude>** rule is unnecessary.
|
>
|
||||||
|
> If you specify an **<exclude>** rule, always specify a corresponding **<include>** rule. Otherwise, if you don't specify an **<include>** rule, the specific files or settings aren't included. They're already excluded from the migration. Thus, an unaccompanied **<exclude>** rule is unnecessary.
|
||||||
|
|
||||||
- [Example 1: How to migrate all files from C:\\ except .mp3 files](#example-1-how-to-migrate-all-files-from-c-except-mp3-files)
|
- [Example 1: How to migrate all files from C:\\ except .mp3 files](#example-1-how-to-migrate-all-files-from-c-except-mp3-files)
|
||||||
|
|
||||||
@ -81,18 +82,18 @@ The following .xml file migrates all files and subfolders in `C:\Data`, except t
|
|||||||
<component type="Documents" context="System">
|
<component type="Documents" context="System">
|
||||||
<displayName _locID="miguser.sharedvideo">Test component</displayName>
|
<displayName _locID="miguser.sharedvideo">Test component</displayName>
|
||||||
<role role="Data">
|
<role role="Data">
|
||||||
<rules>
|
<rules>
|
||||||
<include>
|
<include>
|
||||||
<objectSet>
|
<objectSet>
|
||||||
<pattern type="File">C:\Data\* [*]</pattern>
|
<pattern type="File">C:\Data\* [*]</pattern>
|
||||||
</objectSet>
|
</objectSet>
|
||||||
</include>
|
</include>
|
||||||
<exclude>
|
<exclude>
|
||||||
<objectSet>
|
<objectSet>
|
||||||
<pattern type="File"> C:\Data\temp\* [*]</pattern>
|
<pattern type="File"> C:\Data\temp\* [*]</pattern>
|
||||||
</objectSet>
|
</objectSet>
|
||||||
</exclude>
|
</exclude>
|
||||||
</rules>
|
</rules>
|
||||||
</role>
|
</role>
|
||||||
</component>
|
</component>
|
||||||
</migration>
|
</migration>
|
||||||
@ -104,23 +105,23 @@ The following .xml file migrates any subfolders in `C:\`EngineeringDrafts`, but
|
|||||||
|
|
||||||
```xml
|
```xml
|
||||||
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
|
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
|
||||||
<component type="Documents" context="System">
|
<component type="Documents" context="System">
|
||||||
<displayName>Component to migrate all Engineering Drafts Documents without subfolders</displayName>
|
<displayName>Component to migrate all Engineering Drafts Documents without subfolders</displayName>
|
||||||
<role role="Data">
|
<role role="Data">
|
||||||
<rules>
|
<rules>
|
||||||
<include>
|
<include>
|
||||||
<objectSet>
|
<objectSet>
|
||||||
<pattern type="File"> C:\EngineeringDrafts\* [*]</pattern>
|
<pattern type="File"> C:\EngineeringDrafts\* [*]</pattern>
|
||||||
</objectSet>
|
</objectSet>
|
||||||
</include>
|
</include>
|
||||||
<exclude>
|
<exclude>
|
||||||
<objectSet>
|
<objectSet>
|
||||||
<pattern type="File"> C:\EngineeringDrafts\ [*]</pattern>
|
<pattern type="File"> C:\EngineeringDrafts\ [*]</pattern>
|
||||||
</objectSet>
|
</objectSet>
|
||||||
</exclude>
|
</exclude>
|
||||||
</rules>
|
</rules>
|
||||||
</role>
|
</role>
|
||||||
</component>
|
</component>
|
||||||
</migration>
|
</migration>
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -130,35 +131,35 @@ The following .xml file migrates all files and subfolders in `C:\EngineeringDraf
|
|||||||
|
|
||||||
```xml
|
```xml
|
||||||
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
|
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test">
|
||||||
<component type="Documents" context="System">
|
<component type="Documents" context="System">
|
||||||
<displayName>Component to migrate all Engineering Drafts Documents except Sample.doc</displayName>
|
<displayName>Component to migrate all Engineering Drafts Documents except Sample.doc</displayName>
|
||||||
<role role="Data">
|
<role role="Data">
|
||||||
<rules>
|
<rules>
|
||||||
<include>
|
<include>
|
||||||
<objectSet>
|
<objectSet>
|
||||||
<pattern type="File"> C:\EngineeringDrafts\* [*]</pattern>
|
<pattern type="File"> C:\EngineeringDrafts\* [*]</pattern>
|
||||||
</objectSet>
|
</objectSet>
|
||||||
</include>
|
</include>
|
||||||
<exclude>
|
<exclude>
|
||||||
<objectSet>
|
<objectSet>
|
||||||
<pattern type="File"> C:\EngineeringDrafts\ [Sample.doc]</pattern>
|
<pattern type="File"> C:\EngineeringDrafts\ [Sample.doc]</pattern>
|
||||||
</objectSet>
|
</objectSet>
|
||||||
</exclude>
|
</exclude>
|
||||||
</rules>
|
</rules>
|
||||||
</role>
|
</role>
|
||||||
</component>
|
</component>
|
||||||
</migration>
|
</migration>
|
||||||
```
|
```
|
||||||
|
|
||||||
### Example 5: How to exclude a file from any location
|
### Example 5: How to exclude a file from any location
|
||||||
|
|
||||||
To exclude a Sample.doc file from any location on the C: drive, use the **<pattern>** element. If multiple files exist with the same name on the C: drive, all of these files will be excluded.
|
To exclude a Sample.doc file from any location on the C: drive, use the **<pattern>** element. If multiple files exist with the same name on the C: drive, all of these files are excluded.
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<pattern type="File"> C:\* [Sample.doc] </pattern>
|
<pattern type="File"> C:\* [Sample.doc] </pattern>
|
||||||
```
|
```
|
||||||
|
|
||||||
To exclude a Sample.doc file from any drive on the computer, use the **<script>** element. If multiple files exist with the same name, all of these files will be excluded.
|
To exclude a Sample.doc file from any drive on the computer, use the **<script>** element. If multiple files exist with the same name, all of these files are excluded.
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<script>MigXmlHelper.GenerateDrivePatterns("* [sample.doc]", "Fixed")</script>
|
<script>MigXmlHelper.GenerateDrivePatterns("* [sample.doc]", "Fixed")</script>
|
||||||
@ -174,16 +175,16 @@ The following .xml file excludes all `.mp3` files from the migration:
|
|||||||
|
|
||||||
```xml
|
```xml
|
||||||
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/excludefiles">
|
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/excludefiles">
|
||||||
<component context="System" type="Documents">
|
<component context="System" type="Documents">
|
||||||
<displayName>Test</displayName>
|
<displayName>Test</displayName>
|
||||||
<role role="Data">
|
<role role="Data">
|
||||||
<rules>
|
<rules>
|
||||||
<unconditionalExclude>
|
<unconditionalExclude>
|
||||||
<objectSet>
|
<objectSet>
|
||||||
<script>MigXmlHelper.GenerateDrivePatterns ("* [*.mp3]", "Fixed")</script>
|
<script>MigXmlHelper.GenerateDrivePatterns ("* [*.mp3]", "Fixed")</script>
|
||||||
</objectSet>
|
</objectSet>
|
||||||
</unconditionalExclude>
|
</unconditionalExclude>
|
||||||
</rules>
|
</rules>
|
||||||
</role>
|
</role>
|
||||||
</component>
|
</component>
|
||||||
</migration>
|
</migration>
|
||||||
@ -196,16 +197,16 @@ The following .xml file excludes only the files located on the C: drive.
|
|||||||
```xml
|
```xml
|
||||||
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/allfiles">
|
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/allfiles">
|
||||||
<component type="Documents" context="System">
|
<component type="Documents" context="System">
|
||||||
<displayName>Test</displayName>
|
<displayName>Test</displayName>
|
||||||
<role role="Data">
|
<role role="Data">
|
||||||
<rules>
|
<rules>
|
||||||
<unconditionalExclude>
|
<unconditionalExclude>
|
||||||
<objectSet>
|
<objectSet>
|
||||||
<pattern type="File">c:\*[*]</pattern>
|
<pattern type="File">c:\*[*]</pattern>
|
||||||
</objectSet>
|
</objectSet>
|
||||||
</unconditionalExclude>
|
</unconditionalExclude>
|
||||||
</rules>
|
</rules>
|
||||||
</role>
|
</role>
|
||||||
</component>
|
</component>
|
||||||
</migration>
|
</migration>
|
||||||
```
|
```
|
||||||
@ -217,53 +218,53 @@ The following .xml file unconditionally excludes the `HKEY_CURRENT_USER` registr
|
|||||||
```xml
|
```xml
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/miguser">
|
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/miguser">
|
||||||
<component type="Documents" context="User">
|
<component type="Documents" context="User">
|
||||||
<displayName>Test</displayName>
|
<displayName>Test</displayName>
|
||||||
<role role="Data">
|
<role role="Data">
|
||||||
<rules>
|
<rules>
|
||||||
<include>
|
<include>
|
||||||
<objectSet>
|
|
||||||
<pattern type="Registry">HKCU\testReg[*]</pattern>
|
|
||||||
</objectSet>
|
|
||||||
</include>
|
|
||||||
<unconditionalExclude>
|
|
||||||
<objectSet>
|
<objectSet>
|
||||||
<pattern type="Registry">HKCU\*[*]</pattern>
|
<pattern type="Registry">HKCU\testReg[*]</pattern>
|
||||||
</objectSet>
|
</objectSet>
|
||||||
</unconditionalExclude>
|
</include>
|
||||||
|
<unconditionalExclude>
|
||||||
|
<objectSet>
|
||||||
|
<pattern type="Registry">HKCU\*[*]</pattern>
|
||||||
|
</objectSet>
|
||||||
|
</unconditionalExclude>
|
||||||
</rules>
|
</rules>
|
||||||
</role>
|
</role>
|
||||||
</component>
|
</component>
|
||||||
</migration>
|
</migration>
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Example 4: How to Exclude `C:\Windows` and `C:\Program Files`
|
##### Example 4: How to Exclude `C:\Windows` and `C:\Program Files`
|
||||||
|
|
||||||
The following .xml file unconditionally excludes the system folders of `C:\Windows` and `C:\Program Files`. Note that all `*.docx`, `*.xls` and `*.ppt` files won't be migrated because the **<unconditionalExclude>** element takes precedence over the **<include>** element.
|
The following .xml file unconditionally excludes the system folders of `C:\Windows` and `C:\Program Files`. All `*.docx`, `*.xls` and `*.ppt` files aren't migrated because the **<unconditionalExclude>** element takes precedence over the **<include>** element.
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/miguser">
|
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/miguser">
|
||||||
<component type="Documents" context="System">
|
<component type="Documents" context="System">
|
||||||
<displayName>Test</displayName>
|
<displayName>Test</displayName>
|
||||||
<role role="Data">
|
<role role="Data">
|
||||||
<rules>
|
<rules>
|
||||||
<include>
|
<include>
|
||||||
<objectSet>
|
<objectSet>
|
||||||
<script>MigXmlHelper.GenerateDrivePatterns ("* [*.doc]", "Fixed")</script>
|
<script>MigXmlHelper.GenerateDrivePatterns ("* [*.doc]", "Fixed")</script>
|
||||||
<script>MigXmlHelper.GenerateDrivePatterns ("* [*.xls]", "Fixed")</script>
|
<script>MigXmlHelper.GenerateDrivePatterns ("* [*.xls]", "Fixed")</script>
|
||||||
<script>MigXmlHelper.GenerateDrivePatterns ("* [*.ppt]", "Fixed")</script>
|
<script>MigXmlHelper.GenerateDrivePatterns ("* [*.ppt]", "Fixed")</script>
|
||||||
</objectSet>
|
</objectSet>
|
||||||
</include>
|
</include>
|
||||||
<unconditionalExclude>
|
<unconditionalExclude>
|
||||||
<objectSet>
|
<objectSet>
|
||||||
<pattern type="File">C:\Program Files\* [*]</pattern>
|
<pattern type="File">C:\Program Files\* [*]</pattern>
|
||||||
<pattern type="File">C:\Windows\* [*]</pattern>
|
<pattern type="File">C:\Windows\* [*]</pattern>
|
||||||
</objectSet>
|
</objectSet>
|
||||||
</unconditionalExclude>
|
</unconditionalExclude>
|
||||||
</rules>
|
</rules>
|
||||||
</role>
|
</role>
|
||||||
</component>
|
</component>
|
||||||
</migration>
|
</migration>
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -275,12 +276,13 @@ You can create and modify a `Config.xml` file if you want to exclude components
|
|||||||
|
|
||||||
- **To exclude an operating system setting:** Specify `migrate="no"` for the setting under the **<WindowsComponents>** section.
|
- **To exclude an operating system setting:** Specify `migrate="no"` for the setting under the **<WindowsComponents>** section.
|
||||||
|
|
||||||
- **To exclude My Documents:** Specify `migrate="no"` for **My Documents** under the **<Documents>** section. Note that any **<include>** rules in the .xml files will still apply. For example, if you have a rule that includes all the .docx files in My Documents, then only the .docx files will be migrated, but the rest of the files won't.
|
- **To exclude My Documents:** Specify `migrate="no"` for **My Documents** under the **<Documents>** section. Any **<include>** rules in the .xml files are still applied. For example, if you have a rule that includes all the .docx files in My Documents, then .docx files are still migrated. However, any additional files that aren't .docx aren't migrated.
|
||||||
|
|
||||||
For more information, see [Config.xml File](usmt-configxml-file.md).
|
For more information, see [Config.xml File](usmt-configxml-file.md).
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> To exclude a component from the `Config.xml` file, set the **migrate** value to **"no"**. Deleting the XML tag for the component from the `Config.xml` file will not exclude the component from your migration.
|
>
|
||||||
|
> To exclude a component from the `Config.xml` file, set the **migrate** value to **"no"**. Deleting the XML tag for the component from the `Config.xml` file doesn't exclude the component from your migration.
|
||||||
|
|
||||||
## Related articles
|
## Related articles
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user