This is the excerpt from smsts.log, doesn't tell me much. I execute the same command right after the TS failed and it works:
Expand a string: cscript.exe "%SCRIPTROOT%\Action-CleanupBeforeSysprep.wsf" 1/01/1601 12:00:00 AM 0 (0x0000) Expand a string: 1/01/1601 12:00:00 AM 0 (0x0000) Command line for extension .exe is "%1" %* 1/01/1601 12:00:00 AM 0 (0x0000) Set command line: cscript.exe "%SCRIPTROOT%\Action-CleanupBeforeSysprep.wsf" 1/01/1601 12:00:00 AM 0 (0x0000) Start executing the command line: cscript.exe "%SCRIPTROOT%\Action-CleanupBeforeSysprep.wsf" 1/01/1601 12:00:00 AM 0 (0x0000) !--------------------------------------------------------------------------------------------! 1/01/1601 12:00:00 AM 0 (0x0000) Expand a string: WinPEandFullOS 1/01/1601 12:00:00 AM 0 (0x0000) Executing command line: cscript.exe "%SCRIPTROOT%\Action-CleanupBeforeSysprep.wsf" 1/01/1601 12:00:00 AM 0 (0x0000) Process completed with exit code 1 1/01/1601 12:00:00 AM 0 (0x0000) !--------------------------------------------------------------------------------------------! 1/01/1601 12:00:00 AM 0 (0x0000) Failed to run the action: Cleanup Before Sysprep. To get somewhat further I am just running the TS with LTISuspend, after that I'll give your wrapper a chance. Thanks, David From: "Keith Garner (Hotmail)" Reply-To: <[email protected]> Date: Friday, 20 March 2015 8:57 am To: <[email protected]> Subject: RE: [MDT-OSD] B&C breaks Windows Scripting Host I would start by looking at the smsts.log file, that’s where you can see what commands were executed within the SMS Standalone Task Sequencer. For mysterious errors, I would inject my zticscript wrapper: http://xtremeconsulting.com/blog/capturing-debug-information-from-client-scripts/ Files can be downloaded from: http://mdtex.codeplex.com/SourceControl/latest#Templates.Common/Distribution/Scripts/ZTICScript.cmd http://mdtex.codeplex.com/SourceControl/latest#Templates.Common/Distribution/Scripts/ZTICScript_log.wsf -k From: [email protected] [mailto:[email protected]] On Behalf Of David O'Brien Sent: Thursday, March 19, 2015 2:23 PM To: [email protected] Subject: [MDT-OSD] B&C breaks Windows Scripting Host Hi all, Strange problem here. I'm building a Windows 7 x64 image in MDT 2013 standalone and have the following problem. The Task Sequence runs fine, everything is good until near the end in the "State Restore" phase, right after the "Apply GPO Pack" (which doesn't do anything in my case) I would like to run two wsf scripts. (one is Nickolaj's WSUS cleanup script, the other Mikael's "image cleanup" script) Both fail with "incorrect function", error 1. The Task Sequence fails, I stay logged on as the same user, map the Deployment share again, set the scriptroot variable as MDT would and run the script with the same command and everything is fine, no errors. I tried adding a reboot right before those two steps, didn't help. If I remove those two steps the Task Sequence completes successfully. Anybody seen this before? My workaround now will be to pause the TS and execute the scripts manually. Cheers David
