--- title: Understanding Migration XML Files (Windows 10) description: Understanding Migration XML Files ms.assetid: d3d1fe89-085c-4da8-9657-fd54b8bfc4b7 ms.prod: w10 ms.mktglfcycl: deploy ms.sitesec: library author: greg-lindsay --- # Understanding Migration XML Files You can modify the behavior of a basic User State Migration Tool (USMT)10.0 migration by using XML files; these files provide instructions on where and how the USMT tools should gather and apply files and settings. USMT includes three XML files that you can use to customize a basic migration: the MigDocs.xml and MigUser.xml files, which modify how files are discovered on the source computer, and the MigApps.xml file, which is required in order to migrate supported application settings. You can also create and edit custom XML files and a Config.xml file to further customize your migration. This topic provides an overview of the default and custom migration XML files and includes guidelines for creating and editing a customized version of the MigDocs.xml file. The MigDocs.xml file uses the new **GenerateDocPatterns** function available in USMT to automatically find user documents on a source computer. ## In This Topic [Overview of the Config.xml file](#bkmk-config) [Overview of the MigApp.xml file](#bkmk-migapp) [Overview of the MigDocs.xml file](#bkmk-migdocs) [Overview of the MigUser.xml file](#bkmk-miguser) [Using multiple XML files](#bkmk-multiple) [XML rules for migrating user files](#bkmk-userfiles) [The GenerateDocPatterns function](#bkmk-generate) [Understanding the system and user context](#bkmk-context) [Sample migration rules for customized versions of XML files](#bkmk-samples) [Exclude rules usage examples](#bkmk-exclude) [Include rules usage examples](#bkmk-include) [Next Steps](#bkmk-next) ## Overview of the Config.xml file The Config.xml file is the configuration file created by the `/genconfig` option of the ScanState tool; it can be used to modify which operating-system components are migrated by USMT. The Config.xml file can be used in conjunction with other XML files, such as in the following example: `scanstate /i:migapps.xml /i:migdocs.xml /genconfig:c:\myFolder\config.xml`. When used this way, the Config.xml file tightly controls aspects of the migration, including user profiles, data, and settings, without modifying or creating other XML files. For more information about the Config.xml file, see [Customize USMT XML Files](usmt-customize-xml-files.md) and [Config.xml File](usmt-configxml-file.md). **Note** When modifying the XML elements in the Config.xml file, you should edit an element and set the **migrate** property to **no**, rather than deleting the element from the file. If you delete the element instead of setting the property, the component may still be migrated by rules in other XML files. ## Overview of the MigApp.xml file The MigApp.xml file installed with USMT includes instructions to migrate the settings for the applications listed in [What Does USMT Migrate?](usmt-what-does-usmt-migrate.md). You must include the MigApp.xml file when using the ScanState and LoadState tools, by using the `/i` option in order to migrate application settings. The MigDocs.xml and MigUser.xml files do not migrate application settings. You can create a custom XML file to include additional applications. For more information, see [Customize USMT XML Files](usmt-customize-xml-files.md). **Important** The MigApps.xml file will only detect and migrate .pst files that are linked to Microsoft Office Outlook. See the [Sample migration rules for customized versions of XML files](#bkmk-samples) section of this document for more information about migrating .pst files that are not linked to Outlook. ## Overview of the MigDocs.xml file The MigDocs.xml file uses the new **GenerateDocPatterns** helper function to create instructions for USMT to migrate files from the source computer, based on the location of the files. You can use the MigDocs.xml file with the ScanState and LoadState tools to perform a more targeted migration than using USMT without XML instructions. The default MigDocs.xml file migrates the following: - All files on the root of the drive except %WINDIR%, %PROGRAMFILES%, %PROGRAMDATA%, or %USERS%. - All folders in the root directory of all fixed drives. For example: c:\\data\_mail\\\*\[\*\] - All files from the root of the Profiles folder, except for files in the system profile. For example: c:\\users\\name\[mail.pst\] - All folders from the root of the Profiles folder, except for the system-profile folders. For example: c:\\users\\name\\new folder\\\*\[\*\] - Standard shared folders: - CSIDL\_COMMON\_DESKTOPDIRECTORY - CSIDL\_COMMON\_FAVORITES - CSIDL\_COMMON\_DOCUMENTS - CSIDL\_COMMON\_MUSIC - CSIDL\_COMMON\_PICTURES - CSIDL\_COMMON\_VIDEO - FOLDERID\_PublicDownloads - Standard user-profile folders for each user: - CSIDL\_MYDOCUMENTS - CSIDL\_MYPICTURES - FOLDERID\_OriginalImages - CSIDL\_MYMUSIC - CSIDL\_MYVIDEO - CSIDL\_FAVORITES - CSIDL\_DESKTOP - CSIDL\_QUICKLAUNCH - FOLDERID\_Contacts - FOLDERID\_Libraries - FOLDERID\_Downloads - FOLDERID\_SavedGames - FOLDERID\_RecordedTV The default MigDocs.xml file will not migrate the following: - Files tagged with both the **hidden** and **system** attributes. - Files and folders on removable drives. - Data from the %WINDIR%, %PROGRAMDATA%, and %PROGRAMFILES% folders. - Folders that contain installed applications. You can also use the **/genmigxml** option with the ScanState tool to review and modify what files will be migrated. ## Overview of the MigUser.xml file The MigUser.xml file includes instructions for USMT to migrate user files based on file name extensions. You can use the MigUser.xml file with the ScanState and LoadState tools to perform a more targeted migration than using USMT without XML instructions. The MigUser.xml file will gather all files from the standard user-profile folders, as well as any files on the computer with the specified file name extensions. The default MigUser.xml file migrates the following: - All files from the standard user-profile folders which are described as: - CSIDL\_MYVIDEO - CSIDL\_MYMUSIC - CSIDL\_DESKTOP - CSIDL\_STARTMENU - CSIDL\_PERSONAL - CSIDL\_MYPICTURES - CSIDL\_FAVORITES - CSIDL\_QUICK LAUNCH - Files with the following extensions: .qdf, .qsd, .qel, .qph, .doc\*, .dot\*, .rtf, .mcw, .wps, .scd, .wri, .wpd, .xl\*, .csv, .iqy, .dqy, .oqy, .rqy, .wk\*, .wq1, .slk, .dif, .ppt\*, .pps\*, .pot\*, .sh3, .ch3, .pre, .ppa, .txt, .pst, .one\*, .vl\*, .vsd, .mpp, .or6, .accdb, .mdb, .pub The default MigUser.xml file does not migrate the following: - Files tagged with both the **hidden** and **system** attributes. - Files and folders on removable drives, - Data from the %WINDIR%, %PROGRAMFILES%, %PROGRAMDATA% folders. - ACLS for files in folders outside the user profile. You can make a copy of the MigUser.xml file and modify it to include or exclude standard user-profile folders and file name extensions. If you know all of the extensions for the files you want to migrate from the source computer, use the MigUser.xml file to move all of your relevant data, regardless of the location of the files. However, this may result in a migration that contains more files than intended. For example, if you choose to migrate all .jpg files, you may migrate image files such as thumbnails and logos from legacy applications that are installed on the source computer. **Note** Each file name extension you include in the rules within the MigUser.xml file increases the amount of time needed for the ScanState tool to gather the files for the migration. If you are migrating more than three hundred file types, you may experience a slow migration. For more information about other ways to organize the migration of your data, see the [Using multiple XML files](#bkmk-multiple) section of this document. ## Using multiple XML files You can use multiple XML files with the ScanState and LoadState tools. Each of the default XML files included with or generated by USMT is configured for a specific component of the migration. You can also use custom XML files to supplement these default files with additional migration rules.
XML migration file | Modifies the following components: |
---|---|
Config.xml file |
Operating-system components such as desktop wallpaper and background theme. You can also overload config.xml to include some application and document settings by generating the config.xml file with the other default XML files. For more information, see [Customize USMT XML Files](usmt-customize-xml-files.md) and [Config.xml File](usmt-configxml-file.md). |
MigApps.xml file |
Applications settings. |
MigUser.xml or MigDocs.xml files |
User files and profile settings. |
Custom XML files |
Application settings, user profile settings, or user files, beyond the rules contained in the other XML files. |
Setting | Value | Default Value |
---|---|---|
ScanProgramFiles |
The ScanProgramFiles argument is valid only when the GenerateDocPatterns function is called in a system context. This argument determines whether or not to scan the Program Files directory to gather registered file name extensions for known applications. For example, when set to TRUE, the function discovers and migrates .doc files under the Microsoft Office directory, because .doc is a file name extension registered to a Microsoft Office application. The GenerateDocPatterns function generates this inclusion pattern for .doc files:
If a child folder of an included folder contains an installed application, ScanProgramFiles will also create an exclusion rule for the child folder. All folders under the application folder will be scanned recursively for registered file name extensions. |
False |
IncludePatterns |
The IncludePatterns argument determines whether to generate exclude or include patterns in the XML. When this argument is set to TRUE, the GenerateDocPatterns function generates include patterns and the function must be added under the <include> element. Changing this argument to FALSE generates exclude patterns and the function must be added under the <exclude> element. |
True |
SystemDrive |
The SystemDrive argument determines whether to generate patterns for all fixed drives or only for the system drive. Changing this argument to TRUE restricts all patterns to the system drive. |
False |
Rule 1 |
|
Rule 2 |
|