Saturday, 15 March 2014

Step 5. Advanced image customisation

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.



 

25 comments:

  1. 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.

    ReplyDelete
  2. Found a way to stop windows update with this command in TS

    "ZTIWindowsupdate.wsf" /query to cscript will check for updates but will not install. Make sure windows update is not disabled in TS.

    ReplyDelete
    Replies
    1. Hi Gerry,

      Two 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?

      Delete
    2. 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.
      -Not Ryan Betts

      Delete
  3. This goes very well, but if I introduce the LTIsuspend, then after sysprep the computer reboots and the error comes:
    Can not find script file "C:\LTIBootstrap.vbs''

    Then I see a desktop and capture has not happened.
    Regards, Eugene.

    ReplyDelete
    Replies
    1. 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.

      Remove the LTISuspend step and test the TS.

      Delete
  4. Hi Gerry,

    I 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

    ReplyDelete
    Replies
    1. hi Gerry,

      i 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

      Delete
    2. I have the same issue, something must have changed since this guide was created.

      Delete
    3. Sion's fix isn't working for me.

      Delete
    4. In my situation it was the quotation mark, if I put in just cscript.exe %SCRIPTROOT%\LTISuspend.wsf, the sequence excuted without issue.

      Delete
    5. Thanks! This worked for me.

      Delete
  5. Thanks Anonymous. Taking the " out of the run line worked for me. (and making sure there was a space between cscript.exe and %scriptroot%

    ReplyDelete
  6. Hey guys,

    Still 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

    ReplyDelete
  7. While the suspend step works OK, it is not possible to capture image in that TS (after resume, WinPE apply, sysprep, reboot).

    It 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

    ReplyDelete
  8. Only way to get it actually finish, is to run in F8 cmd capture by hand to mapped drive:

    Dism /Capture-Image /ImageFile:L:\Win7Img.wim /CaptureDir:D:\ /Name:"Windows 7 x64 Sysprep" /Compress:MAX

    ReplyDelete
  9. Just edited the last step "Create WIM" to read:

    cmd /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

    ReplyDelete
  10. Hi Garry, excellent guide,

    I 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,

    ReplyDelete
    Replies
    1. Atomski, deal with default profile, then you will have what you want

      Delete
  11. LTISuspend.wsf ( suspend ) breaks after running windows updates on Windows 10 v1511

    My 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.

    ReplyDelete
  12. It definitely does NOT work on Win 10 v1511
    In 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!)

    ReplyDelete
    Replies
    1. Not true Sebus. I used this solution to successfully capture Windows 10 1511 today.

      Delete
  13. Even worse on LTSB 2016 RS1. Shortcut disappears & nothing happens, not even any log entry

    ReplyDelete
    Replies
    1. See 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.

      Delete