Michael Niehaus' Windows and Office deployment ramblings
First, some background information.
We use the User State Migration Tool 3.0 as part of the user state migration process in BDD 2007 (both Lite Touch and Zero Touch deployments). Unlike previous versions of BDD, we don't run USMT from the network. Instead, we install USMT 3.0 locally on the computer, first in the old operating system for capturing user state, and later in the new operating system for restoring it. Why install it locally? Well, there are four main reasons:
But there was one complication and one glitch in the process. First, the complication: There are four different installers:
So in most cases, you'll need at least two of these for any migration. That's simple enough, since the ZTIUserState.wsf script figures out which one is needed and knows how to install each one. Then there's the glitch: Due to a bug in the Vista installation program, WUSA.EXE (used to install MSU files), USMT 3.0 would not install quietly using the standard "/quiet" switch. This resulted in a workaround implemented in the ZTIUserState.wsf script and described in the BDD 2007 release notes (which hopefully you've read):
Fortunately, since the release of USMT 3.0 there has been a hotfix made available for Windows Vista to fix this "/quiet" installation problem, so if you include this fix in your Windows Vista image you won't need to worry about the workaround above. See http://support.microsoft.com/kb/929761/en-us for more information on that.
Now, let's talk some about customization.
You might not want to use the default USMT 3.0 settings for your deployment. You may choose to create your own XML files, or to customize the provided XML files. Some examples of the types of changes you might want to make:
One customization you probably don't want to make: removing stuff from the default XML files. It's better to use a CONFIG.XML file to do that instead, but more on that later. Going into the specifics of how to make the XML customizations like those I've listed above could be the subject of a book in itself (any takers?), so let's focus instead on the process of making use of the files that you've created or customized. First, test your changes before trying to add them into a real deployment. You can run "scanstate.exe" manually to figure out if your customizations actually work - that's a lot easier than going through an hour-long process just to figure out that you missed something.
Once you've verified that your customizations work as expected, now you need to be able to tell BDD and USMT to use those new XML files. So how do you do that? Well, you need to specify the list of files on the command line that executes "scanstate.exe". But the BDD ZTIUserState.wsf script builds that command line on the fly. It uses a list property to figure out what XML files should be specified through "/i" parameters to "scanstate.exe". But if you don't specify any values for that list property, it assumes that it should use the three default files:
Remember the discussion above about USMT 3.0 being installed locally? Well, by default the original copies of these three files are installed with it. So, if you have customized these files you need to place the updated versions somewhere that the ZTIUserState.wsf script can find them. For Lite Touch, it checks a variety of locations on the deployment point:
Take your pick. The same applies for new files: just copy them into one of these folders. But for Zero Touch, it's a little more complicated, as the files need to be part of the OSD package. I would suggest the following steps:
After doing this, the updated XML files should be in the package directory on all of the SMS distribution points, and the ZTIUserState.wsf script knows to look for them there.
But how do you let the ZTIUserState know that you have new XML files that need to be added to the "scanstate" command line? Well, that goes back to the "list property" that I described above. The name of this parameter is "USMTMigFiles" and it is described in the "Configuration Reference" document like so:
List of files in XML format that are used by USMT (ScanState.exe) to identify user state migration information to be saved. When this property is not specified, the ZTIUserState.wsf script uses MigApp.xml, MigUser.xml, and MigSys.xml. Otherwise, ZTIUserState.wsf uses the files explicitly referenced in this property. The USMTMigFiles property has a numeric suffix (for example, USMTMigFiles1 or USMTMigFiles2). Note: Use this property to specify the .xml files to be used by ScanState.exe instead of using the /I parameter in the ScanStateArgs property. This prevents the ZTIUserState script from potentially duplicating the same list of .xml files.
List of files in XML format that are used by USMT (ScanState.exe) to identify user state migration information to be saved. When this property is not specified, the ZTIUserState.wsf script uses MigApp.xml, MigUser.xml, and MigSys.xml. Otherwise, ZTIUserState.wsf uses the files explicitly referenced in this property. The USMTMigFiles property has a numeric suffix (for example, USMTMigFiles1 or USMTMigFiles2).
Note: Use this property to specify the .xml files to be used by ScanState.exe instead of using the /I parameter in the ScanStateArgs property. This prevents the ZTIUserState script from potentially duplicating the same list of .xml files.
So, that means you need to configure the CustomSettings.ini rules to specify what files you want the ZTIUserState.wsf script to use. And if you specify one file, it overrides the default list of three. So let's assume that you want to use four files, the original three plus one new custom one that you've created. In this case, you'd need entries in CustomSettings.ini like so:
[Default]USMTMigFiles1=migapp.xmlUSMTMigFiles2=migsys.xmlUSMTMigFiles3=miguser.xmlUSMTMigFiles4=MyCustomFile.xml
The ZTIUserState.wsf script would look for each of these files (in the directories specified above). If found, it will copy them as long as the file doesn't already exist in the USMT installation directory on the local computer, by default C:\Program Files\USMT30. If the files do exist, but the file in the installation directory is older than the one that the ZTIUserState found on the network, the script will overlay the older file.
Now, back to the comment about config.xml above. USMT 3.0 has the ability to generate and use a configuration file which says what components from the XML file should actually be processed. By default, they all are. But if you wanted to limit that, e.g. don't migrate a particular application's settings or files, you could do that by turning off that component. The best way to go about this is to run "scanstate.exe" manually with /i parameters for each of the XML files you want to use, then specify the /genconfig parameter. This will generate an XML file with all the components that would be migrated on the current computer, but not a complete list of the available entries. Here's an example command:
scanstate.exe /i:migsys.xml /i:miguser.xml /i:migapp.xml /genconfig:config.xml
You would want to run this on a machine with most of the components present so that the config.xml has the largest number of entries, but it doesn't have to have all of them. What you will want to do then is remove the components that you want to capture, then change only the remaining entries to say that you don't want to capture them (migrate="no"). For example, if I did not want to capture Windows Media Player settings, I would end up with a config.xml file that looks like this:
<?xml version="1.0" encoding="UTF-8"?><Configuration> <Applications> <component displayname="Windows Media Player" migrate="no" ID="Settings|http://www.microsoft.com/migration/1.0/migxmlext/migapp/Windows Media Player/settings||||"/> </Applications></Configuration>
That brings us to the next challenge: making use of this customized config.xml file. Unfortunately, the BDD 2007 ZTIUserState.wsf script does not provide a simple way of specifying that a config.xml file should be specified on the dynamically-generated "scanstate.exe" command line. So, to use this config.xml file you will need to modify the ZTIUserState.wsf script. Fortunately, someone has already done that, so you can check out Jason Scheffelmaer's blog entry at http://www.deployvista.com/Blog/tabid/70/EntryID/22/Default.aspx for more details. Rest assured, we'll have this built into the next version of BDD. (At the time we released, we didn't know you could build a "subset" config.xml file, so we thought the file was machine-specific. Later we found out that wasn't true.)
See, it's all really simple :-)
http://blogs.technet.com/mniehaus/archive/2007/03/22/tips-for-integrating-usmt-3-0-into-bdd-2007.asp
Michael,
What has changed here with Patch 1 to BDD? I have read the release notes for Patch 1 and seen that USMT installation issues are fixed and USMT 3.01 is now supported. What elese has changed? I have heard that config.xml is now supported, but this does not appear to be documented. Could you updat this post?
Thanks and regards,
James