Appendix A: Creating and Customizing Config.xml

Published: June 30, 2006 | Updated: November 30, 2006

The User State Migration feature team can use config.xml to control settings included in the Windows Vista component manifests or the downlevel manifests for Windows 2000 and Windows XP (included with the USMT). Executing Scanstate with the /genconfig option creates this file in the USMT installation folder. After Scanstate collects data and application settings, the User State Migration feature team can modify this file to prevent Loadstate from loading settings and data that are determined to be unnecessary.

The BDD 2007 project does not use config.xml by default. However, the User State Migration feature team can generate a config.xml file to control Loadstate operations to load only a subset of collected data and can specify the file in the CustomSettings.ini control file to cause BDD 2007 to observe the custom settings.

Note   This file does not have to be named config.xml. By using the /genconfig option, the User State Migration feature team can specify the file name; by using the /config option, team members can use any valid .xml file as the Scanstate or Loadstate config.xml file. As a best practice and to prevent confusion, this guide recommends using config.xml unless team members are using multiple file names. Document any alternate names to prevent confusion.

On This Page

Config.xml File Syntax Config.xml File Syntax
Generating Config.xml Generating Config.xml
Modifying Config.xml Modifying Config.xml
Executing Scanstate with Config.xml Executing Scanstate with Config.xml

Config.xml File Syntax

The config.xml file uses nested XML statements to define groups of settings to be migrated. The file includes one large configuration section, bounded by <Configuration> and </Configuration>. Within this section are subsections for <Applications>, <WindowsComponents>, and <Documents>. Final format looks something like Figure 7.

Figure 7. An example of config.xml structure

Figure 7. An example of config.xml structure

Generating Config.xml

As mentioned, Scanstate uses the /genconfig option to create a config.xml file. The full syntax is:

Scanstate /genconfig:config.xml /i:FileName /l:FileName /v:Level

Note   See the Scanstate syntax found in the USMT Help file (USMT.chm) for specific command-line options and their settings.

By specifying a file with the /i option, the User State Migration feature team can use MigSys.xml, MigApp.xml, or MigUser.xml to further control the generation of the config.xml file.

Modifying Config.xml

The User State Migration feature team can modify config.xml to restrict some of the settings and files scanned. This attribute is helpful when the generation process detects an older application that will no longer be used. By modifying config.xml, the team can ensure that the application’s settings and data are not scanned.

To modify config.xml to skip a particular scan, simply change the setting on its line from migrate=”yes” to migrate=”no”. See Figure 7 for an example of this syntax. Take care to understand the structure of config.xml: It nests the XML into families. If a parent is restricted, all the children are restricted, as well, regardless of their setting.

Executing Scanstate with Config.xml

When config.xml configuration is complete and tested, the Deployment feature team can execute it (or BDD 2007 can call the file during the Deploying Phase). The following example shows how the /config command-line option calls config.xml:

Scanstate /config:config.xml /i:FileName /l:FileName /v:Level

Again, the file need not be named config.xml but can be any properly formatted .xml file. The /l option specifies a log file to receive status information of the Scanstate process, and the /v option sets the verbosity level of the output to the log file.


Get the Microsoft Solution Accelerator for Business Desktop Deployment 2007

Update Notifications

Sign up to learn about updates and new releases


Send us your comments or suggestions