THE SQL Server Blog Spot on the Web

Welcome to - The SQL Server blog spot on the web Sign in | |
in Search

John Paul Cook

Windows 7 and USMT 4.0 – a hybrid between upgrade and clean install

Only Vista users have the option to upgrade to Windows 7. XP users do not. But with either OS, there is an option to do a clean install AND preserve users, Favorites, files and application settings. When you choose clean install, if you don’t format your drive, your old Windows installation is preserved as C:\Windows.old. That folder name might make you think it’s just the old operating system’s Windows folder renamed. It’s not, it’s more than that. Here’s the folder structure of Windows.old from my old 64-bit Vista installation:

        Program Files
        Program Files (x86)

All of the previous operating system's users and their Favorites and files are underneath the Users folder. You can migrate the contents of the Users folder in Windows.old to your new Windows 7 installation. To do this, you must download and install the Window Automated Installation Kit (WAIK) for Windows 7. It is available in both TechNet and MSDN subscriber downloads with general availability to follow. Once installed, it provides a special command prompt called Deployment Tools Command Prompt. Run this command prompt as administrator to use the features of the User State Migration Toolkit (USMT) 4.0. There’s one more thing you need to do before performing the user state migration. Install the applications that you had on your old machine on your new machine. USMT won’t migrate the applications themselves, but it will migrate application settings for the same versions of your applications. For example, if you have Office 2007 on the old and new OSes, application settings will be migrated. But if you have different versions of Office on you old and new OSes, don’t expect the application settings to be migrated.

Migration using the USMT is a two step process.

1. Use scanstate to read Windows.old and save the content that you want migrated into yet another folder.

scanstate c:\usmt /o /c /nocompress /i:miguser.xml /i:migapp.xml /hardlink /offlinewinold:c:\windows.old\windows

scanstate saves the data (including the user names and profile specific data such as IE Favorites and the Documents folder tree) into a migration data store folder. I called my folder C:\USMT, but it could be called anything and could be in any writeable location, such as a network share.

2. Use the loadstate tool to read the saved content into your new Windows 7 installation.

loadstate c:\usmt /nocompress /i:miguser.xml /i:migapp.xml /hardlink /ue:UserNameExcluded /lac /lae

loadstate reads from the USMT 4.0 data store and migrates the data to the new Windows 7 installation. If you are migrating local (non-domain) accounts that haven’t been created yet, use /lac (Local Account Creation) to create them. Use /lae (Local Account Enable) to enable them. Account passwords are not migrated.

In theory you can use /mu (Move User) to move a user’s settings and files to a new user name, but I did not get this to work using a source local account and a different name for the destination local account. My interpretation of the USMT help file made me assume that one of the accounts must be a domain account, but I don't really know. Both my old and new user accounts are local accounts.

USMT 4.0 is much faster than previous versions because it uses hardlinks. The entire migration process took minutes instead of hours when compared to previous versions of USMT. It really does work and it saved me a lot of time when compared to the much more inconvenient approach of formatting the hard drive as part of a clean install. It’s a bit unnerving to specify a clean install because it’s not until after you make that choice do you see the reassurance that your data will be preserved in Windows.old.

After using USMT, I started to do the prudent thing – make a full system backup. Windows Backup said it needed over 200 GB to do the backup! Windows 7 and Office 2007 (I didn’t have any other applications installed) are an order of magnitude smaller than that. Based on my experience, it was immediately obvious that shadow copies were the cause. A lot of space was taken by shadow copies from my previous Vista installation. Here’s how to review your shadow copies:

1. In Windows Explorer, right-click your C drive or whatever drive you installed your OS on.
2. Select Restore previous versions.
3. You will see version of your C folder. Select one and click Open.

I turned off System Restore to get rid of the shadow copies and free up space before making the backup. I also turned System Restore back on and created a restore point.

If you do a default installation of the WAIK, the help file is located here: C:\Program Files\Windows AIK\Docs\CHMs\USMT.chm  I found it more helpful than the online documentation.

Finally, just so there’s no confusion, USMT will not migrate installed programs. You’ll have to reinstall all of the installed programs. Since I’ve been asked, yes you might succeed in preserving previously installed programs if you upgrade XP to Vista and then Vista to Windows 7. Reinstalling lots of programs is a pain, but a clean install is the most prudent way to ensure that the final outcome is a stable Windows 7 OS you can trust. Microsoft is recommending that people do a clean installation (using USMT as I’ve described is still considered a clean install) instead of upgrading.

Published Saturday, August 8, 2009 12:38 AM by John Paul Cook
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS



Jay said:

I've been able to upgrade Office XP on Windows XP to Office 2007 on Win7 with USMT 4. Apparently on the first run of Office 2007, it knows to perform migration of the Office XP settings.

January 8, 2010 2:14 PM

Burt Harris said:

This is also a new feature in USMT 4.0 use that uses a different approach to choosing what files to migrate.   It is more likely to migrate files outside the user's profile.  

To use this apply the /i:migdocs.xml option instead of /i:miguser.xml.

Don't apply both switches however, it can duplicate files.

December 11, 2011 8:54 PM

damien48 said:

I am new into this and it seems you have done a proper research on this. I too find this an interesting work. By the way thank you for this info.

August 7, 2017 11:21 PM

Leave a Comment


About John Paul Cook

John Paul Cook is a database and Azure specialist in Houston. He previously worked as a Data Platform Solution Architect in Microsoft's Houston office. Prior to joining Microsoft, he was a SQL Server MVP. He is experienced in SQL Server and Oracle database application design, development, and implementation. He has spoken at many conferences including Microsoft TechEd and the SQL PASS Summit. He has worked in oil and gas, financial, manufacturing, and healthcare industries. John is also a Registered Nurse currently studying to be a psychiatric nurse practitioner. Contributing author to SQL Server MVP Deep Dives and SQL Server MVP Deep Dives Volume 2. Connect on LinkedIn

This Blog



Privacy Statement