none
Why the User State Store was removed after ScanState complete successfully!!! RRS feed

  • Question

  • Hi Friends,


    I follow the offline User State tutorial in REPLACE scenario provided by Zeus (http://social.technet.microsoft.com/Forums/en-US/37f9b92b-181d-4629-a424-a3a6b2b08e9c/performing-a-usmt-migration-in-offline-mode-under-windows-pe-my-solution).


    After run the task sequence i created, everything looks fine, but when the scanstate.exe finish and I browse the user state store I noticed that the content are empy and the only file there is the log file.


    I made 1000 different tests and always get the same result... User State Store empty!!!. When I monitoring the content, I see that the data was copied, the scanstate creates many directories including USMT\Files\C$ etc., but after scanstate.exe was complete... my user data was removed.


    here is my info:


    I use MDT 2012 U1 with WDK (USMT 5.0). I created a USB MEDIA to do this. My intension is to store de user data in the second partition of my USB disk drive (the first is used to boot).

    Content of my CustomSettings.ini:

    UserDataLocation=AUTO
    USMTOfflineMigration=TRUE
    USMTMigFiles1=MigApp.xml (Default USMT 5.0 File)
    USMTMigFiles2=MigDocs.xml (Default USMT 5.0 File)
    USMTMigFiles3=MigUser.xml (Default USMT 5.0 File)
    USMTMigFiles4=Config.xml (Capture a folder called "Data" from C: root)
    ScanStateArgs=/v:5 /o /c /nocompress /localonly
    LoadStateArgs=/v:5 /c /nocompress
    UDShare=W:\UserState
    UDDir=%SerialNumber%
    WipeDisk=FALSE


    Content of TS.xml

    <?xml version="1.0" encoding="utf-8"?>
    <sequence version="3.00" name="Custom Task Sequence" description="Sample Custom Task Sequence">
      <group name="Initialization" disable="false" continueOnError="false" description="Initialize the TS environment" expand="true">
        <step type="BDD_Gather" name="Gather local only" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
          <defaultVarList>
            <variable name="GatherLocalOnly" property="GatherLocalOnly">true</variable>
            <variable name="RulesFile" property="RulesFile"></variable>
          </defaultVarList>
          <action>cscript.exe "%SCRIPTROOT%\ZTIGather.wsf"</action>
        </step>
      </group>
      <group expand="true" name="State Capture (Offline)" description="" disable="false" continueOnError="false">
        <action />
        <step type="SMS_TaskSequence_RunCommandLineAction" name="Preparte USB Store" description="" disable="false" continueOnError="false" startIn="" successCodeList="0 3010" runIn="WinPEandFullOS">
          <defaultVarList>
            <variable name="PackageID" property="PackageID" />
            <variable name="RunAsUser" property="RunAsUser">false</variable>
            <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
            <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
            <variable name="LoadProfile" property="LoadProfile">false</variable>
          </defaultVarList>
          <action>DISKPART /s "%SCRIPTROOT%\Custom\USB.txt"</action>
        </step>
        <step type="SMS_TaskSequence_SetVariableAction" name="Set Offline System Partition (C:)" description="If a Windows folder is found at a given drive letter set %OfflineSystemDrive% to that drive letter so the USMT files and folders can be cached there." disable="false" continueOnError="false" successCodeList="0 3010">
          <defaultVarList>
            <variable name="VariableName" property="VariableName">OfflineSystemDrive</variable>
            <variable name="VariableValue" property="VariableValue">C:</variable>
          </defaultVarList>
          <action>cscript.exe "%SCRIPTROOT%\ZTISetVariable.wsf"</action>
          <condition>
            <operator type="and">
              <expression type="SMS_TaskSequence_FolderConditionExpression">
                <variable name="Path">C:\Windows</variable>
              </expression>
            </operator>
          </condition>
        </step>
        <step type="SMS_TaskSequence_SetVariableAction" name="Set Offline System Partition (D:)" description="If a Windows folder is found at a given drive letter set %OfflineSystemDrive% to that drive letter so the USMT files and folders can be cached there." disable="false" continueOnError="false" successCodeList="0 3010">
          <defaultVarList>
            <variable name="VariableName" property="VariableName">OfflineSystemDrive</variable>
            <variable name="VariableValue" property="VariableValue">D:</variable>
          </defaultVarList>
          <action>cscript.exe "%SCRIPTROOT%\ZTISetVariable.wsf"</action>
          <condition>
            <operator type="and">
              <expression type="SMS_TaskSequence_FolderConditionExpression">
                <variable name="Path">D:\Windows</variable>
              </expression>
            </operator>
          </condition>
        </step>
        <step type="SMS_TaskSequence_SetVariableAction" name="Set Offline System Partition (E:)" description="If a Windows folder is found at a given drive letter set %OfflineSystemDrive% to that drive letter so the USMT files and folders can be cached there." disable="false" continueOnError="false" successCodeList="0 3010">
          <defaultVarList>
            <variable name="VariableName" property="VariableName">OfflineSystemDrive</variable>
            <variable name="VariableValue" property="VariableValue">E:</variable>
          </defaultVarList>
          <action>cscript.exe "%SCRIPTROOT%\ZTISetVariable.wsf"</action>
          <condition>
            <operator type="and">
              <expression type="SMS_TaskSequence_FolderConditionExpression">
                <variable name="Path">E:\Windows</variable>
              </expression>
            </operator>
          </condition>
        </step>
        <step type="SMS_TaskSequence_SetVariableAction" name="Set Offline System Partition (F:)" description="If a Windows folder is found at a given drive letter set %OfflineSystemDrive% to that drive letter so the USMT files and folders can be cached there." disable="true" continueOnError="false" successCodeList="0 3010">
          <defaultVarList>
            <variable name="VariableName" property="VariableName">OfflineSystemDrive</variable>
            <variable name="VariableValue" property="VariableValue">F:</variable>
          </defaultVarList>
          <action>cscript.exe "%SCRIPTROOT%\ZTISetVariable.wsf"</action>
          <condition>
            <operator type="and">
              <expression type="SMS_TaskSequence_FolderConditionExpression">
                <variable name="Path">F:\Windows</variable>
              </expression>
            </operator>
          </condition>
        </step>
        <step type="SMS_TaskSequence_SetVariableAction" name="Set Offline System Partition (G:)" description="If a Windows folder is found at a given drive letter set %OfflineSystemDrive% to that drive letter so the USMT files and folders can be cached there." disable="true" continueOnError="false" successCodeList="0 3010">
          <defaultVarList>
            <variable name="VariableName" property="VariableName">OfflineSystemDrive</variable>
            <variable name="VariableValue" property="VariableValue">G:</variable>
          </defaultVarList>
          <action>cscript.exe "%SCRIPTROOT%\ZTISetVariable.wsf"</action>
          <condition>
            <operator type="and">
              <expression type="SMS_TaskSequence_FolderConditionExpression">
                <variable name="Path">G:\Windows</variable>
              </expression>
            </operator>
          </condition>
        </step>
        <step type="SMS_TaskSequence_SetVariableAction" name="Set USMT Platform Architecture (32-Bit)" description="Determine if the offline system is a 32-bit Windows version and set %MIG_OFFLINE_PLATFORM_ARCH% accordingly." disable="false" continueOnError="false" successCodeList="0 3010">
          <defaultVarList>
            <variable name="VariableName" property="VariableName">MIG_OFFLINE_PLATFORM_ARCH</variable>
            <variable name="VariableValue" property="VariableValue">32</variable>
          </defaultVarList>
          <action>cscript.exe "%SCRIPTROOT%\ZTISetVariable.wsf"</action>
          <condition>
            <operator type="not">
              <expression type="SMS_TaskSequence_FolderConditionExpression">
                <variable name="Path">%OFFLINESYSTEMDRIVE%\Program Files (x86)</variable>
              </expression>
              <expression type="SMS_TaskSequence_FolderConditionExpression">
                <variable name="Path">%OFFLINESYSTEMDRIVE%\Windows\SysWOW64</variable>
              </expression>
            </operator>
          </condition>
        </step>
        <step type="SMS_TaskSequence_SetVariableAction" name="Set USMT Platform Architecture (64-Bit)" description="Determine if the offline system is a 64-bit Windows version and set %MIG_OFFLINE_PLATFORM_ARCH% accordingly." disable="false" continueOnError="false" successCodeList="0 3010">
          <defaultVarList>
            <variable name="VariableName" property="VariableName">MIG_OFFLINE_PLATFORM_ARCH</variable>
            <variable name="VariableValue" property="VariableValue">64</variable>
          </defaultVarList>
          <action>cscript.exe "%SCRIPTROOT%\ZTISetVariable.wsf"</action>
          <condition>
            <operator type="and">
              <expression type="SMS_TaskSequence_FolderConditionExpression">
                <variable name="Path">%OFFLINESYSTEMDRIVE%\Program Files (x86)</variable>
              </expression>
              <expression type="SMS_TaskSequence_FolderConditionExpression">
                <variable name="Path">%OFFLINESYSTEMDRIVE%\Windows\SysWOW64</variable>
              </expression>
            </operator>
          </condition>
        </step>
        <step type="SMS_TaskSequence_SetVariableAction" name="Set State Store Location" description="Set %OSDStateStorePath% to %UDShare%\%UDDir% so path names can be controlled by CS.ini (this will store migration data created by scanstate.exe)." disable="false" continueOnError="false" successCodeList="0 3010">
          <defaultVarList>
            <variable name="VariableName" property="VariableName">OSDStateStorePath</variable>
            <variable name="VariableValue" property="VariableValue">%UDShare%\%UDDir%</variable>
          </defaultVarList>
          <action>cscript.exe "%SCRIPTROOT%\ZTISetVariable.wsf"</action>
        </step>
        <step type="SMS_TaskSequence_RunCommandLineAction" name="Create State Store Location" description="If it does not already exist create a folder to store the user state migration files generated by scanstate.exe." disable="false" continueOnError="false" startIn="" successCodeList="0 3010" runIn="WinPEandFullOS">
          <defaultVarList>
            <variable name="PackageID" property="PackageID"></variable>
            <variable name="RunAsUser" property="RunAsUser">false</variable>
            <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
            <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
            <variable name="LoadProfile" property="LoadProfile">false</variable>
          </defaultVarList>
          <action>cmd.exe /c if not exist "%OSDSTATESTOREPATH%" md "%OSDSTATESTOREPATH%"</action>
        </step>
        <step type="SMS_TaskSequence_RunCommandLineAction" name="Cache USMT Files and Scripts" description="Copy the USMT component files and scripts to a temporary location on the offline system partition." disable="false" continueOnError="false" startIn="" successCodeList="0 3010" runIn="WinPEandFullOS">
          <defaultVarList>
            <variable name="PackageID" property="PackageID"></variable>
            <variable name="RunAsUser" property="RunAsUser">false</variable>
            <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
            <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
            <variable name="LoadProfile" property="LoadProfile">false</variable>
          </defaultVarList>
          <action>xcopy "%DEPLOYROOT%\Tools\%ARCHITECTURE%\USMT5\*" "%UDShare%\USMTFiles\%ARCHITECTURE%" /herciy</action>
        </step>
        <step type="SMS_TaskSequence_SetVariableAction" name="Set USMT Working Directory" description="Set the USMT working directory variable to the USB partition (ex W:\UserState)" disable="false" continueOnError="false" successCodeList="0 3010">
          <defaultVarList>
            <variable name="VariableName" property="VariableName">USMT_WORKING_DIR</variable>
            <variable name="VariableValue" property="VariableValue">%UDShare%</variable>
          </defaultVarList>
          <action>cscript.exe "%SCRIPTROOT%\ZTISetVariable.wsf"</action>
        </step>
        <step type="SMS_TaskSequence_RunCommandLineAction" name="Capture User State (with OfflineWinDir)" description="Perform offline USMT capture by running scanstate.exe commands with variables set by this task sequence and USMT-specific variables in CS.ini." disable="false" continueOnError="false" startIn="" successCodeList="0 3010" runIn="WinPEandFullOS">
          <defaultVarList>
            <variable name="PackageID" property="PackageID"></variable>
            <variable name="RunAsUser" property="RunAsUser">false</variable>
            <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
            <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
            <variable name="LoadProfile" property="LoadProfile">false</variable>
          </defaultVarList>
          <action>"%UDShare%\USMTFiles\%ARCHITECTURE%\Scanstate.exe" "%OSDStateStorePath%" %SCANSTATEARGS% /i:"%UDShare%\USMTFiles\%ARCHITECTURE%\MigApp.xml" /i:"%UDShare%\USMTFiles\%ARCHITECTURE%\MigUser.xml" /i:"%UDShare%\USMTFiles\%ARCHITECTURE%\MigDocs.xml" /i:"%UDShare%\USMTFiles\%ARCHITECTURE%\MigYPF.xml" /offlineWinDir:"%OfflineSystemDrive%\Windows" /l:"%OSDStateStorePath%\%UDDir%_capture.log"</action>
        </step>
        <step type="SMS_TaskSequence_RunCommandLineAction" name="Capture User State (with Offline.xml)" description="Perform offline USMT capture by running scanstate.exe commands with variables set by this task sequence and USMT-specific variables in CS.ini." disable="true" continueOnError="false" startIn="" successCodeList="0 3010" runIn="WinPEandFullOS">
          <defaultVarList>
            <variable name="PackageID" property="PackageID" />
            <variable name="RunAsUser" property="RunAsUser">false</variable>
            <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
            <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
            <variable name="LoadProfile" property="LoadProfile">false</variable>
          </defaultVarList>
          <action>"%OFFLINESYSTEMDRIVE%\USMTFiles\%USMTARCH%\Scanstate.exe" "%OSDSTATESTOREPATH%" %SCANSTATEARGS% /i:"%OFFLINESYSTEMDRIVE%\USMTFiles\%USMTARCH%\MigApp.xml" /i:"%OFFLINESYSTEMDRIVE%\USMTFiles\%USMTARCH%\MigUser.xml" /i:"%OFFLINESYSTEMDRIVE%\USMTFiles\%USMTARCH%\MigCustomData.xml" /config:"%OFFLINESYSTEMDRIVE%\USMTFiles\%USMTARCH%\MigCustomConfig.xml" /offline:"%OFFLINESYSTEMDRIVE%\USMTFiles\%USMTARCH%\Offline.xml" /l:"%OFFLINESYSTEMDRIVE%\MININT\SMSOSD\OSDLOGS\USMTcapture.log" /progress:"%OFFLINESYSTEMDRIVE%\MININT\SMSOSD\OSDLOGS\USMTcapture.prg"</action>
        </step>
        <step type="SMS_TaskSequence_RunCommandLineAction" name="Clean Up USMT Files and Scripts" description="Remove any remaining temporary USMT component files and scripts from the offline system partition." disable="true" continueOnError="false" startIn="" successCodeList="0 3010" runIn="WinPEandFullOS">
          <defaultVarList>
            <variable name="PackageID" property="PackageID"></variable>
            <variable name="RunAsUser" property="RunAsUser">false</variable>
            <variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
            <variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
            <variable name="LoadProfile" property="LoadProfile">false</variable>
          </defaultVarList>
          <action>cmd.exe /c rd "%OFFLINESYSTEMDRIVE%\USMTFiles" /s /q</action>
        </step>
      </group>
    </sequence>


    Note that the first command I run was DISKPART to name the second paritition of my USB DD. The contento of usb.txt looks like:

    select disk 1
    select part 2
    remove
    assign letter=W:
    exit


    Can anyone help me pls? I think that i'm doing something wrong...
    Thanks for your time...

    Friday, September 27, 2013 4:21 PM