none
MDT 2012 - Restore User State - Unable to find USMT files. Cannot capture/restore user state RRS feed

  • Question

  • Hi All

    I am really struggling to get my USMT restore step working in my MDT 6.3.8456.1000 Task Sequence.

    • I manually run (from Windows 10 OS): \\MDTServer\deploymentshare$\Scripts\litetouch.vbs /SkipWizard:YES
    • My UserData variables are:
    LoadStateArgs: /uel:30 /UE:*\administrator /i:MigUser.xml
    ScanStateArgs: /uel:30 /UE:*\administrator /i:MigUser.xml
    UDDir: %OSDComputerName%
    UDShare: %DeployRoot%\USMT-MIG
    UserDataLocation: NETWORK
    USMTConfigFile: config.xml
    • The Capture User State task works perfectly. Note I can see C:\MININT\USMT\X64 copied to the local computer whilst its capturing
    • MDT then restarts the PC and carries out the preinstall/install/postinstall and state restore phases.
    • When the “restore user state” phase kicks, the deployment fails and I get an error:

    “Checking for USMT Files in c:\minint\tools\x64\amd64

    Failure (9705): Unable to find USMT files. Cannot capture/restore user state”

    I am a bit baffled as what the issue is here. The path is completely different to the capture state. I have dug around the ZTIUserState.wsf and notice the following If Statement. Having checked BDD.log I can see that DeploymentMethod=SCCM in which case (based on the if statement) I am not sure how the sScanSateFolder would reflect the correct deployment share path (%DeployRoot%\Tools\x64\USMT). I could be going down a rabbit hole here but because I kicked the deployment off using litetouch over the network, shouldn't DeploymentMethod = UNC and therefore get the 'Else' on the if statement and get the correct scanstate path?

    This was working fine a few weeks ago and I have no idea why is not working now.

    		If oEnvironment.Item("DeploymentMethod") = "SCCM" then
    
    			sScanStateFolder = oShell.CurrentDirectory & "\" & sUSMTArchitecture
    
    			oLogging.CreateEntry "Checking for USMT Files in " & sScanStateFolder, LogTypeInfo
    			If oFSO.FileExists (sScanStateFolder & "\scanstate.exe") then
    				oLogging.CreateEntry "Found scanstate.exe version = " & oFSO.GetFileVersion(sScanStateFolder & "\scanstate.exe"), LogTypeInfo
    				sUSMTVersion = "USMT5"	
    				sUSMTPath = sScanStateFolder
    			Else
    				oLogging.ReportFailure "Unable to find USMT files, cannot capture/restore user state.", 9705
    			End if	
    			
    		Else
    
    			' Use the USMT files in the USMT5 folder (which can be a later version)
    			
    			sUSMTVersion = "USMT5"
    			sScanStateFolder = oEnvironment.Item("DeployRoot") & "\Tools\" & sUSMTArchitecture & "\" & sUSMTVersion
    
    			oLogging.CreateEntry "Checking for USMT Files in " & sScanStateFolder, LogTypeInfo
    			If oFSO.FileExists(sScanStateFolder & "\ScanState.exe") then
    				oLogging.CreateEntry "Found scanstate.exe version = " & oFSO.GetFileVersion(sScanStateFolder & "\scanstate.exe"), LogTypeInfo
    				sUSMTPath = oEnvironment.Item("DeployRoot") & "\Tools\" & sUSMTArchitecture & "\" & sUSMTVersion
    			Else
    				oLogging.ReportFailure "Unable to find USMT files, cannot capture/restore user state.", 9705
    			End if
    
    		End If

    Anyone have any suggestions? Im starting to go crazy


    • Edited by Tee-Eff Wednesday, September 11, 2019 7:30 AM
    Tuesday, September 10, 2019 11:14 PM

Answers

All replies

  • Just a mini update on this - Adding a copy step to the TS before Restore User State "fixes" the problem. 

    xcopy.exe "%DeployRoot%\Tools\x64\USMT5" "c:\minint\tools\x64\amd64" /e /i /q /h /y

    I obviously would prefer to get to the bottom of the actual problem

    Wednesday, September 11, 2019 8:04 AM
  • Got to the bottom of this. I was using Staging OU Webservices and script and evidently the ZTIMoveComputer.wsf script sets oEnvironment.Item("DeploymentMethod") = "SCCM"

    https://deploymentresearch.com/moving-computers-to-another-ou-during-deployment-webservice-style/

    All sorted now

    • Marked as answer by Tee-Eff Wednesday, September 11, 2019 12:14 PM
    Wednesday, September 11, 2019 12:14 PM