Migrate ThinApp sandboxes with USMT in Horizon Mirage

In one of my last articles I showed how it is possible to extend the User State Migration Tool (USMT) which is used inside of Horizon Mirage. While I showed the steps on how to get a custom XML file recognized and used by Mirage I left all the heavy lifting of creating the custom XML files to you.

As many of our customers are using ThinApp and USMT as well as Mirage don’t support the migration of ThinApp user and application settings out of the box I though I published the XML file to get this done below. Luckily ThinApp saves all settings on a per-user per-application basis in a central location. By default this location is %AppData%Thinstall. Additionally ThinApp sandboxes are as portable at the ThinApp packages itself and therefore can be easily transferred between different systems.

The following XML file is telling Mirage respectively USMT to include this directory during the migration process.

<migration urlid="http://www.microsoft.com/migration/externalUserDocs">
<!-- This component migrates ThinApp sandboxes -->
<component type="Documents" context="User">
<displayName>ThinApp Sandboxes</displayName>
<role role="Data">
<rules context="User">
<pattern type="File">%CSIDL_APPDATA%Thinstall* [*]</pattern>

Just save this file as ThinApp.xml inside your USMT x86 and x64 folder and customize the Launch_USMT.cmd to add it to the Mirage USMT process. How this can be done is outlined in my article called: How to customize USMT in Horizon Mirage.

How to customize USMT in Horizon Mirage

When doing a Windows 7 migration using Horizon Mirage the User State Migration Tool from Microsoft is used to migrate user settings and data as well as operating system settings.

USMT by itself already supports a lot of settings and additionally Mirage adds support for even more settings which are automatically migrated. Have a look at my previous article to get to know about the settings which are migrated out of the box.

Still in most cases USMT inside Mirage needs to be modified as additional application, user or operating system settings and data need to be transferred during the migration. For example you may want to migrate Google Chrome, Mozilla Firefox or SAP GUI settings.

Extending USMT is just a matter of creating additional XML files which contain the information on what additional settings should be migrated. This can be done manually by following the USMT user guide custom XML examples or using a nice tool called USMT XML Builder GUI.

After the XML file with the needed settings is created (in my example it is called ThinApp.xml) it needs to be copied into the USMT x86 and x64 folder. To get these folders you have to download USMT and update it. I covered how this can be done in my prevoius article on how to import USMT into Mirage.


When the USMT folder is prepared an the custom XML files are added we need to customize the USMT script inside Mirage. During the USMT stage Mirage launches a script called “Launch_USMT.cmd” which is located in the Mirage Client folder under ” C:Program FilesWanovaMirage Service”. This file needs to be copied to the root of the USMT folder.


After this is done the script needs to be adjusted to include the newly created custom XML file. For this just open the “Launch_USMT.cmd” in a text editor of your choice and modify the variable USMT_MIG_XML to include the custom XML file.


For each new XML file the following parameter needs to be appended to the variable:


Of course you have to change the name of the XML to the appropriate one. After you changed the variable it should be look similar to following example:


set USMT_MIG_XML=/i:%USMT_LOCATION%MigApp.xml /i:%USMT_LOCATION%MigDocs.xml /i:%WallpaperFile_XML_PATH% /i:%KeyboardLayout_XML_PATH% /i:%MigRegionalSettings_XML_PATH% /i:%DefaultPrinter_XML_PATH% /i:%Win7CustomSettings_XML_PATH%


set USMT_MIG_XML=/i:%USMT_LOCATION%MigApp.xml /i:%USMT_LOCATION%MigDocs.xml /i:%WallpaperFile_XML_PATH% /i:%KeyboardLayout_XML_PATH% /i:%MigRegionalSettings_XML_PATH% /i:%DefaultPrinter_XML_PATH% /i:%Win7CustomSettings_XML_PATH% /i:%USMT_LOCATION%ThinApp.xml

After the variable is changed and the updated script is saved the USMT folder needs to be imported to Mirage again.


From now on the customized USMT is used for any migration task.

What does Horizon Mirage migrate with USMT?

VMware Horizon Mirage is often used for migration scenarios. Besides hardware migrations Mirage also supports the migration from one Windows version to another. To be more specific Mirage supports the migration from Windows XP to Windows 7 and Windows Vista to Windows 7.

During the migration process Mirage uses the Microsoft User State Migration Tool (USMT) to migrate operating system settings and user data from the old Windows version to Windows 7.

By default the following data is migrated (Source: What Does USMT Migrate?):

  • Folders from each user profile. My Documents, My Video, My Music, My Pictures, desktop files, Start menu, Quick Launch settings, and Favorites.
  • Folders from the All Users and Public profiles. Shared Documents, Shared Video, Shared Music, Shared desktop files, Shared Pictures, Shared Start menu, and Shared Favorites.
  • File types. .accdb, .ch3, .csv, .dif, .doc*, .dot*, .dqy, .iqy, .mcw, .mdb*, .mpp, .one*, .oqy, .or6, .pot*, .ppa, .pps*, .ppt*, .pre, .pst, .pub, .qdf, .qel, .qph, .qsd, .rqy, .rtf, .scd, .sh3, .slk, .txt, .vl*, .vsd, .wk*, .wpd, .wps, .wq1, .wri, .xl*, .xla, .xlb, .xls*.
  • Access control lists.

USMT also migrates a whole bunch of operating system settings. Mirage uses the offline migration feature of USMT to migrate the user and operating system settings from the Windows.old directory to the new Windows 7 installation. Because Mirage uses offline migration by default only the following settings are migrated:

  • Accessibility settings
  • Address book
  • Command-prompt settings
  • EFS files
  • Favorites
  • Folder options
  • Fonts
  • Group membership
  • Microsoft® Open Database Connectivity (ODBC) settings
  • Mouse and keyboard settings
  • Network drive mapping
  • RAS connection and phone book (.pbk) files
  • Remote Access
  • Windows Mail. Microsoft Outlook® Express Mail (.dbx) files are migrated from Windows XP.
  • Windows Rights Management

Because some major settings are missing when using the default settings in offline migration mode Mirage adds additional functionalities to USMT to migrate the following settings:

  • Keyboard layout
  • Regional settings
  • OS language
  • Network printers (behind network share) + network drives
  • Raw network printers
  • Default printer
  • Time zone
  • Static IP settings
  • Wallpaper
  • Internet Explorer start page
  • Explorer and Taskbar options

Last but not least USMT supports the migration of several application settings. Most of them are only supported in specific (and often very old) versions. One major application suite which is supported is Microsoft Office of course. USMT supports Office 2003 to 2010 and also supports the migration from one Office version (e.g. Office 2003) to another (e.g. Office 2010).

For more information about USMT and which applications are supported have a look at the following article: What Does USMT Migrate?

Because USMT is very flexible it is possible to add additional applications and operating system settings to it. More information about USMT can be found in the User State Migration Tool 4.0 User’s Guide

Add USMT to Horizon Mirage

While adding the User State Migration Tool (USMT) to Horizon Mirage is a pretty straight forward task it isn’t documented in any way.

Update: Since version 4.3 the method to import USMT into Mirage is now covered by the official documentation. If you like a more detailed description with pictures this article is still worth reading.

First of all Mirage in the current version (4.x) only supports USMT version 4.0. To get this USMT version you first have to download the Windows Automated Installation Kit for Windows 7 (WAIK) from Microsoft. This download may take a while as the complete kit is around 2 gigs.

After WAIK is downloaded you have to install it. After the installation you will find the USMT sources under C:Program FilesWindows AIKToolsUSMT.


Unfortunately the version of USMT 4.0 which is included in WAIK doesn’t support Office 2010. If you need Office 2010 support you have to download the USMT 4.0 update.

After this is done you have to place the files contained in the update inside the USMT folder and replace the files loadstate.exe, migapp.xml, migcore.dll and scanstate.exe in the x86 respectively in the x64 folder.


After you have merged the update to the USMT folder it is time to import USMT using the Mirage management console.



After the import Mirage now automatically migrates settings and files when doing a Windows XP/Vista to Windows 7 migration.