DetailPage-MSS-KB

Microsoft small business knowledge base

Article ID: 977565 - Last Review: January 15, 2010 - Revision: 1.0

SYMPTOMS

You back up the user state on a client computer by using Microsoft Deployment Toolkit 2010 together with User State Migration Tool (USMT) 4.0 that is included with Windows Automated Installation Kit (AIK) for Windows 7. However, items such as mapped network drives and network printers are not migrated from the source computer.

CAUSE

This issue occurs because the Ztiuserstate.wsf script that is in Microsoft Deployment Toolkit 2010 uses an incorrect working directory by default.

RESOLUTION

To resolve this issue, follow these steps:
  • Locate the Ztiuserstate.wsf file that is located in the scripts folder that is located on the deployment share. Open this file for editing.
  • Locate the Ztiuserstate.wsf file that is located in the Program Files\Microsoft Deployment Toolkit\Templates\Distribution\Scripts folder that is located on the client computer. Open this file for editing.
  • Perform the following changes to both of the files that you have opened for editing:
    1. Find the following two lines of code that are located at or near line 620:
      sCmd = "cmd /c """"" & sUSMTPath & "\scanstate.exe"" " & sScanStateArgs & " > nul 2>&1"""
      iRetVal = oUtility.RunWithHeartbeat(sCmd)
    2. Add the following code between those two lines of code:
      oShell.CurrentDirectory = sUSMTPath
      After you add this line of code, the resultant three lines of code should be as follows:
      sCmd = "cmd /c """"" & sUSMTPath & "\scanstate.exe"" " & sScanStateArgs & " > nul 2>&1"""
      oShell.CurrentDirectory = sUSMTPath
      iRetVal = oUtility.RunWithHeartbeat(sCmd)
    3. Find the following two lines of code that are located at or near line 843:
      sCmd = "cmd /c """"" & sUSMTPath & "\loadstate.exe"" " & sLoadStateArgs & " > nul 2>&1"""
      iRetVal = oUtility.RunWithHeartbeat(sCmd)
    4. Add the following code between those two lines of code:
      oShell.CurrentDirectory = sUSMTPath
      After you add this line of code, the resultant three lines of code should be as follows:
      sCmd = "cmd /c """"" & sUSMTPath & "\loadstate.exe"" " & sLoadStateArgs & " > nul 2>&1"""
      oShell.CurrentDirectory = sUSMTPath
      iRetVal = oUtility.RunWithHeartbeat(sCmd)
    5. Save and close the file.

APPLIES TO
  • Microsoft Solution Accelerator for Business Desktop Deployment
Keywords: 
kbsurveynew kbexpertiseadvanced kbtshoot KB977565
Share
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support