Windows XP to Windows 7 Hard-Link Migration of User Files and Settings
This guide explains options for moving your users’ files and settings from the Windows XP operating system to the Windows 7 or Windows Vista operating system. This guide also introduces how the User State Migration Tool (USMT) 4.0 can be used on multiple computers to expedite file and setting migration when installing Windows 7 or Windows Vista to an existing Windows XP computer.
Windows Vista with Service Pack 1 (SP1) allows users to perform in-place upgrades to Windows 7 Beta using a standard Windows 7 Beta DVD created using the published ISO files. For customers with Windows Vista Enterprise, a Windows 7 Enterprise DVD must be used for in-place upgrade. By inserting a DVD with Windows 7 Beta and performing the installation, the user will see the upgrade option on this screen:
By selecting the upgrade option, files, settings and programs are retained. In-place upgrade is intended for use by consumers, and it supports upgrades from Windows Vista with SP1 or newer operating systems to Windows 7. In-place upgrade in Windows 7 Beta does not provide support for Windows XP or the main release of Windows Vista.
This guide explains your options for moving files and settings from operating systems not supported by in-place upgrade or for those looking to perform a clean installation of Windows 7 Beta to existing hardware with Windows XP, Windows Vista, or Windows 7 Beta already installed, while retaining and migrating the files and settings that constitute the users’ profiles on that hardware. The steps in this guide will not migrate programs or applications from the old operating system to Windows 7 Beta.
This document is intended for IT professionals with limited deployment infrastructure or automation expertise, primarily installing from retail DVDs or operating system files contained within DVD or ISO media. For more advanced deployment and image customization scenarios, see the Microsoft Deployment Toolkit guidance at Microsoft.com/deployment or the operating system deployment capabilities that are part of Microsoft System Center Configuration Manager 2007 at Microsoft.com/configmgr.
In-Box Tools for Migrating User Files and Settings
Windows 7 and previous versions of Windows offer in-box tools for migrating user files and settings from one computer to another. Windows Easy Transfer in Windows 7 continues to offer this capability. Detailed instructions for using Windows Easy Transfer to manually migrate files from Windows XP are found in the Step-by-Step: Windows 7 Upgrade and Migration for Beta guide on Microsoft TechNet. For smaller organizations without dedicated IT staff, Windows Easy Transfer provides a guided experience for migrating user files and settings from Windows XP to Windows 7. For organizations with limited IT staff, this option is also preferred for migrations from one physical computer to another (computer replacement). Windows Easy Transfer in the computer replacement scenario also provides the option to connect two computers using a USB cable or network location to transfer files.
User State Migration Tool 4.0 Hard-Link Migration
The User State Migration Tool (USMT) has traditionally offered command-line scriptable tools for migrating user state from one computer or operating system to another and has provided granular control for which files are to be migrated or excluded from a migration. The User State Migration Tool (USMT) 4.0 is now part of the Windows Automated Installation Kit (AIK) for Windows 7 Beta and can be downloaded here.
Hard-Link Migration is a new feature in USMT 4.0 that enables in-place migration (computer refresh), which processes much faster than traditional file copy mechanisms. Hard-Link Migration scans the computer for user files and settings then creates a directory of links to those files using hard links. The hard links are then remapped to the appropriate locations in the new operating system. The entire process typically takes a few minutes to run, does not double-instance files on the local disk, and can save several hours migrating files in computer refresh scenarios in which the user keeps the same hardware. USMT Hard-Link Migration can be used both in online and offline scenarios, but in this document we will introduce how USMT can be used in an offline scenario migrating files from a default clean install using files found in Windows.old. Guidance for online scenarios can be found in the USMT documentation as part of the Windows AIK for Windows 7 Beta download.
Building a USB Drive to Store USMT 4.0 Files and Simple Commands
This process will assume that Windows 7 Beta is installed using DVD or similar media to an existing Windows XP computer. We will begin by compiling the components needed to create an external USB drive with the components used to carry out the migration process. This USB drive will be used to migrate files from Windows.old to the appropriate full operating system locations and can be used for both Windows 7 Beta and Windows Vista. User files will not be copied to the USB drive, so any USB drive with more than 50 MB free space will be adequate.
Step 1: Download the Windows Automated Installation Kit (Windows 7 Beta) ISO file from http://go.microsoft.com/fwlink/?LinkID=142950.
Step 2: Burn the Windows AIK ISO file to a DVD and follow the installation instructions.
Step 3: Once you have installed Windows AIK, copy C:\Program Files\Windows AIK\Tools\USMT\ to an external USB drive. Your USB drive should have the “USMT” folder in the root directory with “amd64” and “x86” subfolders.
Step 4: Create a batch file for use with x86 file migrations. Open Notepad and copy the following text into a new file:
If exist D:\USMT\*.* xcopy D:\USMT\*.* /e /v /y C:\Windows\USMT\
If exist E:\USMT\*.* xcopy E:\USMT\*.* /e /v /y C:\Windows\USMT\
If exist F:\USMT\*.* xcopy F:\USMT\*.* /e /v /y C:\Windows\USMT\
If exist G:\USMT\*.* xcopy G:\USMT\*.* /e /v /y C:\Windows\USMT\
If exist H:\USMT\*.* xcopy H:\USMT\*.* /e /v /y C:\Windows\USMT\
If exist I:\USMT\*.* xcopy I:\USMT\*.* /e /v /y C:\Windows\USMT\
If exist J:\USMT\*.* xcopy J:\USMT\*.* /e /v /y C:\Windows\USMT\
If exist K:\USMT\*.* xcopy K:\USMT\*.* /e /v /y C:\Windows\USMT\
scanstate.exe c:\store /v:13 /o /c /hardlink /nocompress /efs:hardlink /i:MigApp.xml /i:MigDocs.xml /offlineWinDir:c:\windows.old\windows
loadstate.exe c:\store /v:13 /c /lac /lae /i:migapp.xml /i:migdocs.xml /sf /hardlink /nocompress
Note: Windows 7 Release Candidate and later releases of USMT 4.0 will replace “/offlineWinDir” with the “/offlineWinOld” command line switch.
Explanation of Batch File Commands: The first section of the batch file determines where USMT files are kept and copies those files to the C:\Windows directory. The second section changes the directory to the newly created USMT directory. The scanstate.exe command will create the hard-link migration store at C:\store from the windows.old directory, and the loadstate.exe command will remap the hard-link files to their appropriate locations in Windows 7 Beta or Windows Vista. The batch file and the USMT folder will need to be run as an administrator on the computer performing the migration. For AMD 64-bit migrations, you can modify the batch file by changing “Cd c:\windows\usmt\x86” to “Cd c:\windows\usmt\amd64”. USMT will support installs moving from 32-bit editions of Windows XP to 64-bit editions of Windows 7 Beta or Windows Vista.
Step 5: Save the batch file as “Migrate.bat” in the USB drive. The USB drive should look like this:
Installing Windows 7 Beta on an Existing Windows XP Computer
It is a good practice to back up your files prior to installing the new operating system, but file backup is not mandatory in this case, and the backup files will typically not be needed when following this process.
Step 6: Install Windows 7 in a Windows XP or newer operating system using standard DVD or ISO media. This process is the same when installing Windows Vista from a DVD.
IMPORTANT: Follow the default installation instructions and do not delete or format partitions containing the operating system or user data.
Step 7: Once you have completely installed Windows 7, open Windows Explorer (Start menu) and browse to “Computer > Local Disk (C:\)” (or if not installed on “C:\”, browse to the drive letter containing the Windows 7 operating system). If there were folders already on the C:\ root directory in the Windows XP operating system, those folders will still be there. You will also find a Windows.old folder.
Windows.old contains the files and settings we will be migrating from the Windows XP operating system to the newly installed Windows 7 operating system. If you were previously joined to a domain, you can join the computer to the domain now, prior to running USMT commands in the following steps. Likewise, now is a good time to install applications found on the previous operating system, as USMT will migrate application settings for these applications. For example, Microsoft Office Outlook settings and PST files will automatically be mapped for that program; USMT migration will eliminate the need to manually reconfigure Office Outlook after you run Step 8.
Step 8: Insert your USB drive with USMT files into a USB port on the Windows 7 computer. Copy the migrate.bat file to the desktop. Right click the migrate.bat file and choose “Run as Administrator.” USMT 4.0 requires administrative context to run. The batch file will copy USMT 4.0 files from the USB drive to the Windows directory, run scanstate.exe and loadstate.exe commands to create the hard-link migration store, and map the links into to the new locations.
Step 9: Once the batch file has completed, browse to “Computer > Local Disk (C:\) > Users”. You will see the user folders in Windows 7 Beta and all user files in corresponding file libraries. If you had favorites defined in Internet Explorer, you can open Internet Explorer in Windows 7 Beta to ensure that application settings have been migrated.
Once you have finished these steps, you can re-use the USB drive and batch file on computers with clean installs of Windows Vista or Windows 7 Beta and containing the Windows.old directories. As soon as you have determined that all necessary files were migrated from Windows.old, you can use the Disk Cleanup utility and remove previously installed versions of Windows to delete Windows.old. Deletion of Windows.old will not delete the files that have been migrated using hard links. As long as one link to the file exists, the file will not be deleted.