When using MDT 2010 Zero Touch to deploy Windows 7 x64 the Task Sequence may hang in State Restore phase. The hang occurs when the Use MDT Toolkit Action tries to run.
Cause:
It’s actually not MDT’s fault, its a bug in ConfigMgr, and it will occur for every script/action that tries to use the Microsoft.SMS.TSEnvironment. The root cause is an invalid registry entry preventing tscore.dll from registering.
Workaround:
Fix the registry by adding the following code to ZTISCCM.wsf, here is the updated script: ZTISCCM.zip
Dim tmpShell, tmpFSO
Set tmpShell = CreateObject(“WScript.Shell”)
Set tmpFSO = CreateObject(“Scripting.FileSystemObject”)
If tmpFSO.FileExists(tmpShell.ExpandEnvironmentStrings(“%WINDIR%\SysWOW64\CCM\TSCore.DLL”)) then
On Error Resume Next
tmpShell.RegWrite “HKCR\TypeLib\{D5E1749D-832D-4587-AFC3-9462187FE2F5}\1.0\0\win64\”, tmpShell.ExpandEnvironmentStrings(“%WINDIR%\SysWOW64\CCM\TSCore.DLL”)
On Error Goto 0
End if