Enterprise Mobility and Security Blog

RSS

[In today’s post Levi Stevens discusses an issue with USMT and Config Manager 2007 SP2]


Problem Description


When upgrading or reinstalling Windows XP to Windows 7 using USMT 4.0 to migrate system and user state, settings like Wallpaper and Network Printer mappings are not migrated.


Running scanstate.exe from a folder other than the USMT – x86 – folder (the default for the Task Sequence) prevents scanstate.exe from finding the DLManifests folder to include system components like wallpaper and folder settings. These settings will not be migrated.  USMT 4.0 must be run from a local folder containing the DLManifests folder.


The User State Migration Tool (USMT) version 4.0 released with the Windows Automated Installation Kit (WAIK) version 2.0 and is a prerequisite for using OS Deployment with ConfigMgr 2007 SP2.


Symptoms


After migrating user state the wall paper or folder settings do not migrate.  If you have enabled verbose logging (/v:5) you may see the following entry in ScanState.log:


2009-09-14 15:41:19, Info [0x000000] Downlevel Manifests folder is not present. System component settings will not be gathered.


Workaround


Copy the USMT binaries to local and use “Run Command Line” task sequence step to run scanstate.exe from the USMTx86 directory (set the Starting In from “Run Command Line” to USMTx86 folder).  You will need two steps, one to copy the USTM folder to the local drive, and one to run USMT capture state.


Example Task Sequence


Save the below example as TSExample.xml, then import this into ConfigMgr.  You will need to edit the task sequence to set the reference package that contains the RunScanState.bat example workaround script.

<?xml version=”1.0″?>
<SmsTaskSequencePackage xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=“http://www.w3.org/2001/XMLSchema”>
  <BootImageID />
  <Category />
  <DependentProgram />
  <Description />
  <Duration>360</Duration>
  <Name>WorkAround</Name>
  <ProgramFlags>152084496</ProgramFlags>
  <SequenceData>
    <sequence version=“3.00”>
      <referenceList>
        <reference package=“SMS00001” />
      </referenceList>
      <step type=“SMS_TaskSequence_RunCommandLineAction” name=“Run Command Line” description=“” runIn=“WinPEandFullOS” successCodeList=“0 3010”>
        <action>smsswd.exe /run: cmd.exe /c md %systemdrive%usmtsafe</action>
        <defaultVarList>
          <variable name=“CommandLine” property=“CommandLine” hidden=“true”>cmd.exe /c md %systemdrive%usmtsafe</variable>
          <variable name=“SMSTSDisableWow64Redirection” property=“DisableWow64Redirection”>true</variable>
          <variable name=“_SMSTSRunCommandLineAsUser” property=“RunAsUser”>false</variable>
          <variable name=“SuccessCodes” property=“SuccessCodes” hidden=“true”>0 3010</variable>
        </defaultVarList>
      </step>
      <step type=“SMS_TaskSequence_RunCommandLineAction” name=“Run Command Line” description=“” runIn=“WinPEandFullOS” successCodeList=“0 3010”>
        <action>smsswd.exe /run: cmd.exe /c md %systemdrive%USMTbits</action>
        <defaultVarList>
          <variable name=“CommandLine” property=“CommandLine” hidden=“true”>cmd.exe /c md %systemdrive%USMTbits</variable>
          <variable name=“SMSTSDisableWow64Redirection” property=“DisableWow64Redirection”>false</variable>
          <variable name=“_SMSTSRunCommandLineAsUser” property=“RunAsUser”>false</variable>
          <variable name=“SuccessCodes” property=“SuccessCodes” hidden=“true”>0 3010</variable>
        </defaultVarList>
      </step>
      <step type=“SMS_TaskSequence_SetVariableAction” name=“Set Task Sequence Variable” description=“” runIn=“WinPEandFullOS” successCodeList=“0”>
        <action>tsenv.exe “OSDStateStorePath=%systemdrive%usmtsafe”</action>
        <defaultVarList>
          <variable name=“VariableName” property=“VariableName” hidden=“true”>OSDStateStorePath</variable>
          <variable name=“VariableValue” property=“VariableValue” hidden=“true”>%systemdrive%usmtsafe</variable>
        </defaultVarList>
      </step>
      <step type=“SMS_TaskSequence_RunCommandLineAction” name=“Run Command Line” description=“” runIn=“WinPEandFullOS” successCodeList=“0 3010”>
        <action>smsswd.exe /run:SMS00001 xcopy * %systemdrive%USMTbits /herciy</action>
        <defaultVarList>
          <variable name=“CommandLine” property=“CommandLine” hidden=“true”>xcopy * %systemdrive%USMTbits /herciy</variable>
          <variable name=“SMSTSDisableWow64Redirection” property=“DisableWow64Redirection”>true</variable>
          <variable name=“PackageID” property=“PackageID” hidden=“true”>7S000003</variable>
          <variable name=“_SMSTSRunCommandLineAsUser” property=“RunAsUser”>false</variable>
          <variable name=“SuccessCodes” property=“SuccessCodes” hidden=“true”>0 3010</variable>
        </defaultVarList>
      </step>
      <step type=“SMS_TaskSequence_RunCommandLineAction” name=“Run Command Line” description=“” runIn=“WinPEandFullOS” successCodeList=“0 3010”>
        <action>smsswd.exe /run: cmd /c runscanstate.bat %OSDStateStorePath% %systemdrive%</action>
        <defaultVarList>
          <variable name=“CommandLine” property=“CommandLine” hidden=“true”>cmd /c runscanstate.bat %OSDStateStorePath% %systemdrive%</variable>
          <variable name=“SMSTSDisableWow64Redirection” property=“DisableWow64Redirection”>false</variable>
          <variable name=“_SMSTSRunCommandLineAsUser” property=“RunAsUser”>false</variable>
          <variable name=“SuccessCodes” property=“SuccessCodes” hidden=“true”>0 3010</variable>
          <variable name=“WorkingDirectory” property=“WorkingDirectory”>%systemdrive%USMTbitsx86</variable>
        </defaultVarList>
      </step>
    </sequence>
  </SequenceData>
  <SourceDate>2009-10-21T19:33:43</SourceDate>
  <SupportedOperatingSystems />
  <IconSize>0</IconSize>
</SmsTaskSequencePackage>

RunScanState.Bat

@set USMT_WORKING_DIR=%~2%USMTbitsx86
“%~2USMTbitsx86scanstate.exe” “%~1” /o /localonly /efs:copyraw /all /v:5
/l:%~2windowsTEMPSMSTSLogscanstate.log
/progress:%~2windowsTEMPSMSTSLogscanstateprogress.log
/i:%~2USMTbitsx86miguser.xml /i:%~2USMTbitsx86migapp.xml

 


Levi Stevens


This posting is provided “AS IS” with no warranties and confers no rights.