Tuesday, August 27, 2013

how to pause task sequence


Testing the changes in SCCM OSD task sequence is a painful and time consuming task. If we sitting in front of the computer and watching the screen that is fine. Whereas you want to go away from your desk but want to see the newly added step execution through the task sequence, then the pause step comes handy.

Create a simple VB Script with a MsgBox and execute before the task which you want to monitor. The task sequence will stop until we click on the MSG box.

Here how we do;
Create a TSPaused.vbs using following code;
*****************************************************************************
' Hide the progress dialog
Set oTSProgressUI = CreateObject("Microsoft.SMS.TSProgressUI")
oTSProgressUI.CloseProgressDialog
Set oTSProgressUI = Nothing

' Msg box to Display the msg

MsgBox "Windows 7 Operating System deployment paused. Please click OK to resume the task sequence", 64, "Operating System Deployment paused"

****************************************************************************
Copy ServiceUIx64.exe (for x64 OS) from MDT tools folder. Create package (TSPaused) and TSPaused.vbs and Servicex64.exe in the package. Distribute the package to all the distribution points.

I want to pause the task sequence just before applying the Toolkit package.
So open the task sequence, add a Run Command Line step just before Apply toolkit package step.
Re-name the step to Paused then add following command in command line;
serviceUIx64.exe -process:TSProgressUI.exe %SYSTEMROOT%\System32\wscript.exe TSPaused.vbs
Select Disable 64-bit file system redirection and select package TS Paused.
The Paused task looks as below;
When the paused step is executed, the following MSG window will be displayed.
The task sequence will be paused and MSG window will be displayed until we click OK.

1 comment:

  1. This looks great, however I am stuck on the command line portion of the Package.

    ReplyDelete