Back to ConfigMgr main menu
Back to MDT Menu
We have the basic solution in place. The last step is to add a task to pause the task sequence between the build and
capture phases. This will allow us to apply any changes we need to the image before it is sysprepped and captured.
Add a new task (Run command line) to the Build & Capture task sequence below Apply Local GPO package.
Enter the command line: cscript.exe “%SCRIPTROOT%\LTISuspend.wsf”
(Edit 7th May 2015: It seems that this command is giving some trouble for some people (see comments below). Try using the command without the quotes if it doesn't work for you.).
That's it. Now run the task sequence again.
This time it pauses after the build phase. See the "Resume Task Sequence" icon on the desktop.
Now make your changes. You can reboot as many times as you like.
Install applications.
Make registry changes.
etc
When you are finished click to resume.
Sysprep is executed.
The image is captured.
Captured customised WIM via MDT 2013 Lite Touch Build & Capture.
What command, I can use within TS to stop Windows update. I was performing above test. Everything worked out fine. After, I finished installing few applications and was about to resume TS, windows update kicked in and installed few updates that required system restart. The TS sequence failed because of that. So what, I want to do before pausing the TS is to run another command to not do any windows update until the capture is done.
ReplyDeleteFound a way to stop windows update with this command in TS
ReplyDelete"ZTIWindowsupdate.wsf" /query to cscript will check for updates but will not install. Make sure windows update is not disabled in TS.
Nice work Ram
DeleteHi Gerry,
DeleteTwo things i want to ask.
im now trying to add the pause to the TS between the build and capture but its failing. this is after i have added the Run Command Line: cscript.exe “%SCRIPTROOT%\LTISuspend.wsf”
im getting an error " litetouch deployment failed, return code = -2147467259 0x80004005
failed to run the action: Run Command Line.
Incorrect function.(Error: 00000001; Source, Windows)
any ideas?
Try the process listed on http://blog.ryanbetts.co.uk/2014/06/mdt-error-litetouch-deployment-failed.html. It did the trick for me. Also, leave a nice reply to the site author if this worked for you as well.
Delete-Not Ryan Betts
This goes very well, but if I introduce the LTIsuspend, then after sysprep the computer reboots and the error comes:
ReplyDeleteCan not find script file "C:\LTIBootstrap.vbs''
Then I see a desktop and capture has not happened.
Regards, Eugene.
Sorry for the late response. I've been on vacation.mI think you've made an error here Eugene. The process should not boot into a desktop. It should boot into Windows PE and start the capture. Check your Capture steps.
DeleteRemove the LTISuspend step and test the TS.
Hi Gerry,
ReplyDeleteI followed your steps and the TS run fine when i did the build and capture. now that i want to pause the TS between the build and capture phase by inserting the Run Command Line: cscript.exe “%SCRIPTROOT%\LTISuspend.wsf” im now getting an error that says
Litetouch deployment faild, Return Code = -2147467259 0x8004005
Failed to run the action: Run Command Line.
i can forward the whole error message - it says 6 errors received .
Do you have an idea on what i should change/check?
Thanks
SION
hi Gerry,
Deletei have moved to Command Line up within the task sequence and placed it under state restore under install applications. and its working fine.
not sure why but ya its working fine
Thanks
I have the same issue, something must have changed since this guide was created.
DeleteSion's fix isn't working for me.
DeleteIn my situation it was the quotation mark, if I put in just cscript.exe %SCRIPTROOT%\LTISuspend.wsf, the sequence excuted without issue.
DeleteThanks! This worked for me.
DeleteThanks Anonymous. Taking the " out of the run line worked for me. (and making sure there was a space between cscript.exe and %scriptroot%
ReplyDeleteHey guys,
ReplyDeleteStill having problems with the csript.exe %SCRIPTROOT%\LTISuspend.wsf command. I have a dozen times but its not working. Is there anything i need to do between changing the command and testing (Eg updating the deployment share etc).
Really need to get this sorted.
Cheers
PS Fantastic guide, really appreciate it :D
While the suspend step works OK, it is not possible to capture image in that TS (after resume, WinPE apply, sysprep, reboot).
ReplyDeleteIt always gives error:
FAILURE (5456): Unable to determine Destination Disk, Partition, and/or Drive
I expect this is due to some variable loss after reboot
Not to say that ZTIBackup.wsf does NOT exist in LIte Touch wim at all
Only way to get it actually finish, is to run in F8 cmd capture by hand to mapped drive:
ReplyDeleteDism /Capture-Image /ImageFile:L:\Win7Img.wim /CaptureDir:D:\ /Name:"Windows 7 x64 Sysprep" /Compress:MAX
Just edited the last step "Create WIM" to read:
ReplyDeletecmd /k net use L: \\sccm-server\deploymentshare$\captures && Dism /Capture-Image /ImageFile:L:\Win7Img.wim /CaptureDir:D:\ /Name:"Windows 7 x64 Sysprep" /Compress:MAX /configfile:L:\config.ini
Works fine now
Hi Garry, excellent guide,
ReplyDeleteI have one question for you. I have customized my Win10 image just the way I want it: changed background picture, adjusted the privacy settings, accent color, added desktop icons...it was my understanding that this would be also included after capture has finished in the newly created .wim file but only things that i see from my customization are some added files in system32 and windows updates are up to date. How do I include those changes as well?
Thanks,
Atomski, deal with default profile, then you will have what you want
DeleteLTISuspend.wsf ( suspend ) breaks after running windows updates on Windows 10 v1511
ReplyDeleteMy steps:
When the task sequence creates my reference machine using my Volume License downloaded ISO and it logs in for the first time, it suspends the task sequence on the desktop which is what I want.
Now that it is in suspended, I run check for updates which finds and installs updates. I reboot.
When I log back in and double click the suspend desktop shortcut to continue the build to create the ISO, nothing happens. The shortcut disappears from the desktop but it never resumes the build. No errors.
Note: If I don't run check for updates, then it works fine when I double click on the suspend shortcut to continue with the build.
It definitely does NOT work on Win 10 v1511
ReplyDeleteIn my case the resume starts (and sysprep runs), but then it fails & never reboots to WinPE to capture the image (I can capture by force rebooting to WinPE iso & doing manual capture, but that is not ideal, my technicians will never do it!)
Not true Sebus. I used this solution to successfully capture Windows 10 1511 today.
DeleteEven worse on LTSB 2016 RS1. Shortcut disappears & nothing happens, not even any log entry
ReplyDeleteSee above. It works on Windows 10 1511. I've done it. Never tried on LTSB but I'd be confident that it's the same.
DeleteI have the same issue with Windows 10 ENT. I have applied updates and made configuration changes, clicked resume and the shortcut disappears and that is all.
DeleteIt is working fine for my windows 7 image.
Did anyone find the solution?
Regards
John
I think I have found the issue while trying to run a simple sysprep. It seems UAC is restricting the script running to resume the process.
DeleteI implemented a cut down version of the following http://thefrustratedanalyst.blogspot.co.uk/2014/01/configuring-uac-settings-during-osd-via.html
My version of the script only sets "User Account Control: Run all administrators in Admin Approval Mode" to "Disabled"
I added this command line step before the suspend step and the sysprep ran successfully.