Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
programming4us
Windows 7

Working with the User State Migration Tool (part 5) - Getting Extra Mileage Out of the USMT

- Windows 10 Product Activation Keys Free 2019 (All Versions)
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire
8/6/2013 9:43:36 AM

5. Getting Extra Mileage Out of the USMT

This section outlines some tips and tricks you can use to get some extra mileage out of the USMT.

5.1. Modify the MigDocs.xml File to Exclude Files

You can modify the MigDocs.xml file to exclude any specific types of files based on their extension. You do this by adding an exclude rule to the file. The exclude rule takes the following format. In this example, it will exclude all MP3 files but you can substitute any extension for .mp3:

<exc1ude>
   <objectSet>
      <pattern type="Fi1e">C:\* [*.mp3]</pattern>

</objectSet>
</exclude>

The following XML text can be used by itself in a different MyMigDocs.xml file to migrate all data files except MP3 files, or you can just place the previous <exclude> node within the existing MigDocs.xml file.

<migration

 urlid="http://www.microsoft.com/migration/1.0/migxmlext/mp3files">
  <!-- This component migrates all files except

        those with .mp3 extension-->
  <component type="Documents" context="System">
  <displayName _locID="miguser.sharedvideo">MP3 Files</displayName>
     <role role="Data">
     <rules>
        <include filter='MigXmlHelper.IgnoreIrrelevantLinks()'>
           <objectSet>
              <pattern type="File">C:\* [*]</pattern>
           </objectSet>
     </include>
     <exclude>
        <objectSet>
           <pattern type="File">C:\* [*.mp3]</pattern>
        </objectSet>
      </exclude>
    </rules>
  </role>
 </component>
</migration>

					  

You can find additional examples of how to exclude files in the "Exclude Files and Settings" article in the User State Migration Tool (USM) 4.0 User's Guide available in the help file at C:\ Program Files\Windows AIK\Docs\CHMs\USMT.chm.

5.2. Building a USB Drive to Simplify Migrations

It's relatively easy to create a portable USB drive with the tools you need to perform hard-link migrations on systems that include the Windows.old folder. You can even include a script to copy all the needed files, and then complete the migration. All you have to do is plug in the USB and start the batch file.

First, copy the entire contents of the C:\Program Files\Windows AIK\Tools\USMT\ folder onto the USB drive. These files are on your technician's computer after installing the WAIK. Next, create a batch file named Migrate32.bat, with the following lines:

©ECHO OFF
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\
Cd  c:\windows\usmt\x86
scanstate.exe c:\store /v:5 /o /c /hardlink /nocompress

/efs:hard1ink /i:MigApp.xm1 /i:MigDocs.xm1

 off1inewino1d:c:\windows.o1d\windows
1oadstate.exe c:\store /v:5 /c /lac /i:migapp.xm1

 /i:migdocs.xm1 /hard1ink /nocompress

The If exist... lines detect which drive is the USB drive and then copy all of the USMT files onto the target computer. The Cd line changes the directory to the usmt\86 folder. The ScanState command captures the user state data, and then the LoadState command applies it.

If your target computer is a 64-bit system, save the file as Migrate64.bat and change the Cd line to:

Cd c:\windows\usmt\amd64

This script is derived from the "Windows XP to Windows 7 Hard-Link Migration of User Files and Settings" white paper available from Microsoft's download site (www.microsoft.com/downloads).

5.3. Deleting the Hard-Link Store

If you later need to remove the hard-link store but get errors indicating that the folder is locked, you can delete it with the following command:

C:\>c:\usmt\Usmtuti1s /d c:\HardLinkStore

You should only delete the hard-link store once you are sure that you have migrated all the needed data.

5.4. Deleting the Windows.old Folder

The Windows.old folder can take a lot of space. Once you are done with it, you can delete it to regain space. The simplest way to delete it is using Disk Cleanup from the properties of the drive. You can access the properties by right-clicking the drive in Windows Explorer and selecting Properties. After clicking Disk Cleanup, click the Cleanup System Files button. The Previous Windows installation(s) selection will appear and you can then select it to delete the Windows.old folder.

While this will work, you may want to automate the process. You can use the following two lines in a script file to delete the Windows.old folder. The first line takes ownership of the Windows.old folder and all files and folders within it. The second line removes the folder, including all folders within it.

takeown /f c:\windows.o1d\* /r /a /d Y
rd /s /q c:\Windows.o1d\
Other -----------------
- Sharing Your Computer with Others : Join a Homegroup
- Sharing Your Computer with Others : Create a Homegroup
- Sharing Your Computer with Others : Delete an Account
- Sharing Your Computer with Others : Change a User's Name
- Mix and Match with Old Windows and Macs : Internetworking with Macintosh
- Mix and Match with Old Windows and Macs : Internetworking with Windows 95, 98, and Me, Internetworking with UNIX and Linux
- Mix and Match with Old Windows and Macs : Networking with Other Operating Systems, Internetworking with Windows Vista, XP, and 2000
- Sharing Your Computer with Others : Create a User Account, Switch Between Accounts
- Sharing Your Computer with Others : Display User Accounts
- Plug and Play and Power Management : WMI Request Handler, Synchronization Issues, Security
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Popular tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 windows Phone 7 windows Phone 8
programming4us programming4us
Celebrity Style, Fashion Trends, Beauty and Makeup Tips.
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server