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:
Re-register tscore.dll by adding a custom action (Run command line) before the Use MDT Tookit Package action.
Regsvr32 /s "%WINDIR%\System32\CCM\tscore.dll"
Note: Since this is x64 you may think you would need to register the tscore.dll in the %WINDIR%\SysWOW64\CCM folder but since the Task Sequence is running with registry redirection, SysWOW64 and System32 are the same thing.