Howto use User State Migration Tool (USMT) with Firefox & Thunderbird

Microsoft does not offer Windows Easy Transfer any more, which worked fine for transfering user profile directories from Windows XP to Windows 7. Well, at least it worked in most cases (if you click customize, then advanced, then manually select Mozilla and Thunderbird inside the appdata directories of all users).

Microsoft does recommend an alternative product, but that is free only for personal use.

But digging a bit deeper shows that Microsoft does still have an own free offer: the User State Migration Tool (USMT).

Unfortunately this is said to have a lot of disadvantages:

  • it is impossible to find a place to download current versions.
  • modifying its configuration requires editing difficult XML-files.
  • it does not transfer the settings of Firefox and Thunderbird.
  • the description does not mention transfer of Desktop Backgrouds or Icon Layout.
  • it is difficult to use.

However a test reveals that it is not as bad as it appears to be. Let's check all these issues:

Preserve Desktop

USMT does preserve Desktop Background Image, and Icon Layout (if the background image was not one of the built-in images, and if the icons fit on the screen with their new size and spacing, what will probably not be the case when transferring from XP).

Download

It is not difficult to get, if you know how, just a bit time consuming.

USMT is not available as standalone download any more, but as part of the Automated Installation Kit (AIK), which was renamed to Assessment and Deployment Kit (ADK). You can find it here:
https://developer.microsoft.com/windows/hardware/windows-assessment-deployment-kit
which points for version 10 to
https://go.microsoft.com/fwlink/p/?LinkId=526740

Download and install it. If you do not yet have the required version of DotNet, the installer will first only install that, and quits. In this case rerun it.

Then go to the directory where it was installed, for version 10 this is usually
C:\Program Files\Windows Kits\10
There you find Assessment and Deployment Kit, and inside that is the thing that you want: User State Migration Tool. Inside that are three subdirectories: one for 32bit, one for 64bit, and one for something which most of you will never need. Copy the subdirectory that you need, and then uninstall the ADK again.

Add Firefox and Thunderbird to the xml config

If you want to add support for Firefox und Thunderbird, load migapp.xml into notepad.exe, find the section about Firefox, and replace the digit 3 with an asterix *. or replace that section with the contents of this (download with right-click, save target as).

Use

Prepare source and target machines:

  1. copy the directory from above to C:\ and rename it to USMT
  2. run cmd.exe with admin rights, e.g.
    tap the window-key, type "cmd", wait 1 second, press strg+shift+enter
  3. access a server share, e.g.
    net use \\server\share /user:admin * /persistent:no
  4. go to the USMT directory, e.g.
    cd /d c:\usmt

On the source machine:

  • run scanstate to save everything on the server, e.g.
    scanstate.exe \\server\share\store /i:migdocs.xml /i:migapp.xml /o

On the target machine:

  • run loadstate to restore the saved state from the server, e.g.
    loadstate.exe \\server\share\store /i:migdocs.xml /i:migapp.xml /lac /lae

The option /o says overwrite.
The options /lac and /lae say: create missing local users, and enable them.

Tested with Firefox and Thunderbird versions 45.2, transfering from Win7 to Win7, should also work with Windows 10 on as target machine.

Note

Please note that USMT does not transfer the whole contents of the profile directories. The XML-files specify which parts are needed, and which are not. But they do so only for the supported software which USMT knows. Test your use case, and if needed add more declarations to the XML-files.
List of copied data: https://technet.microsoft.com/library/mt270914%28v=vs.85%29.aspx
More info: https://technet.microsoft.com/library/mt299209%28v=vs.85%29.aspx

Update 2017-06-20

With newer Versions you may need two conditions in the file migapp.xml:

MigXmlHelper.DoesObjectExist("Registry","%HklmWowSoftware%\Mozilla\Mozilla Firefox *.*\bin [PathToExe]") MigXmlHelper.DoesObjectExist("Registry","%HklmWowSoftware%\Mozilla\Mozilla Firefox\*.*\Main [PathToExe]")

Thanks Thomas!