Fast & Free: Desktop Data Migration Using USMT - PowerPoint PPT Presentation

Fast free desktop data migration using usmt " data-normal="" > " data-normal="" >
1 / 35

  • Uploaded on
  • Presentation posted in: General

Fast & Free: Desktop Data Migration Using USMT. Brad Engle Janet Keener. Year 1 – 487 units. Imaged at the desktop with DVDs, vendor-supplied migration utility. No consistency. Captured music brought from home. Learned a lesson from that. Years 2-5.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

Download Presentation

Fast & Free: Desktop Data Migration Using USMT

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

Fast free desktop data migration using usmt

Fast & Free: Desktop Data Migration Using USMT

Brad Engle

Janet Keener

Year 1 487 units

Year 1 – 487 units

  • Imaged at the desktop with DVDs, vendor-supplied migration utility. No consistency. Captured music brought from home. Learned a lesson from that.

Years 2 5

Years 2-5

  • Imaged at the factory now. Still using vendor-supplied migration utility, still no consistency.

Year 6

Year 6

  • Still imaging at factory, but they have a new utility. Slow, inconsistent, cumbersome, no real-time, on-the-fly edits to the script.

Year 7

Year 7

  • Things changed…

Year 71

Year 7

  • Factory imaging, but vendor has NO utility that would migrate from XP to Windows 7.


Year 1 - 487 unitsYear 5 - 511

Year 2 - 415 unitsYear 6 - 445

Year 3 - 317 unitsYear 7 - 351

Year 4 - 142 unitsYear 8 - 128

Year 9 - ~470 units


What changed janet says

What changed?Janet says:

  • Where did the idea come from?

    • Necessity – no cost-effective 3rd party utility

    • Current vendor had no solution

Brads says

Brads says:

  • Boss said, “Figure it out! You have 2 weeks.”

  • Primary idea came from TechNet, using “Windows Automated Installation Kit (AIK) for Windows 7”

How we began

How we began

  • Research, research, research

  • Reviewed Altiris, Norton Ghost Console, some freeware applications. NONE were cost-effective, all were complex or lacked features

  • USMT kept appearing in white papers

Fast free desktop data migration using usmt

  • Primary idea came from TechNet

  • v 4.0 Included for free with The Windows Automated Installation Kit (AIK) for Windows 7 (We had been using it since it came out but was not aware of this feature)

  • Was a straight forward, easily modified solution that was controlled by a few xml files

The files

The Files

  • Config.xml

  • MigApp.xml

  • MigUser.xml

  • MigDocs.xml

  • Custom.xml

Fast free desktop data migration using usmt

  • Config.xml

  • Created by running scanstate.exe /genconfigon the source PC

  • Used to control what system settings are copied from the old computer to the new computer

  • Must ensure that all apps are installed so genconfig can create a complete inventory

Config xml


<?xml version="1.0" encoding="UTF-8" ?>

- <Configuration>

<Applications />

<Documents />

- <WindowsComponents>

- <component displayname="gadgets" migrate="no" ID="gadgets">

<component displayname="gadgets\sticky notes" migrate="no" ID="gadgets\sticky notes" />


<component displayname="WCF-NonHTTP-Activation" migrate="no" ID=""/>

<component displayname="TSPortalWebPart" migrate="no" ID="" />

<component displayname="WCF-HTTP-Activation" migrate="no" ID="" />

<component displayname="WindowsSearchEngine" migrate="no" ID="" />

<component displayname="Microsoft-Windows-themecpl" migrate="no" ID="" />

- <component displayname="Tablet PC Settings" migrate="no" ID="tablet_pc_settings">

- <component displayname="Accessories" migrate="no" ID="tablet_pc_settings\tablet_pc_accessories">

<component displayname="Microsoft-Windows-TabletPC-Journal" migrate="no" ID="" />


- <component displayname="Input Panel" migrate="no" ID="tablet_pc_settings\tablet_pc_input_panel">

<component displayname="Microsoft-Windows-TabletPC-InputPanel" migrate="no" ID="" />


Fast free desktop data migration using usmt

  • With all the No, then why have the file?

  • Only place to have error control, hardlink control, and profile control

Error control

Error Control

  • USMT will fail on:

    • locked or corrupt files

    • locked or corrupt registry keys

  • Can be overridden by specifying win32 error codes in the <errorcontrol> section

Fast free desktop data migration using usmt

<ErrorControl> <fileError> <nonFatalerrorCode="33">* [*]</nonFatal> <fatal errorCode="any">C:\Users\* *]</fatal> </fileError><registryError><nonFatalerrorCode="5">* [*]</nonFatal></registryError>


Fast free desktop data migration using usmt

  • Hardlink control - used for keeping a profile on the local hard drive when an in-place refresh or upgrade is performed

  • Profile control - when unpacking the profile you can change permissions, change domains, etc.

Fast free desktop data migration using usmt

  • miguser.xml - define folders, files and file types to migrate. Essentially the “profile” copy

  • By default it will copy everything in the user’s profile as well as files with a specified extension

Fast free desktop data migration using usmt

  • Extensions copied by default:

    .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

Fast free desktop data migration using usmt

<component type="Documents" context="System">

<displayName_locID="miguser.userdata">User Data</displayName>

<role role="Data">




<script>MigXmlHelper.GenerateDrivePatterns ("* [*.qdf]", "Fixed")</script>

<script>MigXmlHelper.GenerateDrivePatterns ("* [*.qsd]", "Fixed")</script>

Fast free desktop data migration using usmt

component type="Documents" context="User">

<displayName _locID="miguser.desktop">Desktop</displayName>


<path type="File">%CSIDL_DESKTOP%</path>


<role role="Settings">







<include filter='MigXmlHelper.IgnoreIrrelevantLinks()'>


<pattern type="File">%CSIDL_DESKTOP%\* [*]</pattern>



<merge script="MigXmlHelper.DestinationPriority()">


<pattern type="File">%CSIDL_DESKTOP% [desktop.ini]</pattern>

<pattern type="File">%CSIDL_DESKTOP%\* [*]</pattern>






Fast free desktop data migration using usmt

  • MigDocs.xml – Very similar to the miguser.xml. Only real difference is it migrates shared files

  • Important – Do NOT use the MigDocs.xml and the MigUser.xml at the same time

Custom xml


  • Allows any files not covered in the other xml files to be copied

  • Can copy registry keys, files, settings

  • Can use Mutual Exclude commands

    • Mutual Excludes transcend all xml files and cannot be negated. This is the only value that has this power

Custom xml1


EXCLUDES Code sample:


<role role="Data">




<script>MigXmlHelper.GenerateDrivePatterns ("* [*.divx]", "Fixed")</script>

<script>MigXmlHelper.GenerateDrivePatterns ("* [*.zip]", "Fixed")</script>

<script>MigXmlHelper.GenerateDrivePatterns ("* [*.exe]", "Fixed")</script>

<script>MigXmlHelper.GenerateDrivePatterns ("* [*.msi]", "Fixed")</script>

<script>MigXmlHelper.GenerateDrivePatterns ("* [*.iso]", "Fixed")</script>…

Custom xml2

custom. xml

INCLUDE CODE SAMPLE: <role role="Data">




pattern type="File">c:\*[*]</pattern>

<script>MigXmlHelper.GenerateDrivePatterns ("* [*.dic]", "Fixed")</script>

<script>MigXmlHelper.GenerateDrivePatterns ("* [*.pst]", "Fixed")</script>

<script>MigXmlHelper.GenerateDrivePatterns ("* [*.nk2]", "Fixed")</script>





  • Scanstate is the command line that actually launches USMT to do the migration.

Scanstate switches

Scanstate Switches

  • Some helpful switches:

    • /ui: user to be migrated. I wrote it to supply the primary user. You can specify all users, currently logged in, etc. Very powerful

    • /ue: excludes specified users

    • /efs: decrypts files & moves them to TARGET system

Scanstate switches1

Scanstate Switches

  • /localonly: DO NOT go scan all those huge network drives!

  • /config: specifies that you have a configuration file to use.

  • /i: an include statement that says you have additional XML files to control the behavior of the migration.

  • /o: overwrites any existing data on the target drive.



  • set /p name= Machine name?

  • set /p user= Username?

  • del /q/f c:\oitdriver

  • scanstate \\etsu%name%\c$\migration\mystore /vsc /ue:*\*/ui:etsu\%user% /efs:decryptcopy /localonly /config:config.xml /i:miguser.xml /i:custom.xml /v:13 /l:scan.log /o /listfiles:c:\temp\copylist.txt



  • In our experiences, we’ve seen about a 2:1 compression ratio. If the utility packaged 4 GB, it would transfer about 2 GB. That’s what Microsoft says, too.

Unpack the mig file

Unpack the .mig file

  • On TARGET machine, just run usmt.mig file created by the process.

  • The Easy Transfer Wizard included in Windows 7 begins, and the data is unpackaged to the appropriate location on the new drive.

  • Example – 1.7 GB packaged up. .88GB transferred in about 4 minutes. Easy Transfer complete unpacking in about 3 minutes. FAST!



  • Even if the user’s account has never logged into the TARGET system, this utility will generate the profile and place the files appropriately. 

  • If you get an error 36, running the mig.bat file, the profile on the SOURCE system is corrupt. 

Next we hope to

Next, we hope to…

  • Explore the restorestate command & options, and how that can be integrated into drive imaging/re-imaging.

  • Research Error code 36 and ways to overcome that (temp profile being migrated)

Questions comments


  • Login