LTIPause.vbs – Take a break in deployment

Ok, so I know there is a very nice script called LTISuspend.wsf that will suspend the deployment, kind of perfect when you need to stop the deployment at a certain point and then resume after you have “fixed” the things you need to do.

But that is not always perfect, especially when you are in to troubleshooting, of course that never happens for me since I always build everything perfect the first time, or not. So a good friend of mine once showed me a simple but very useful tip and that is to create a vbscript called LTIPause.vbs, save it in the scripts folder and then use the run command for every section that you would like the task sequence to take a break, when you have checked whatever you need to check you just hit ok and it will continue. The content of the script is very, very small and looks like this

MsgBox “ok”

Hey, it does not get easier then that as far as I see it. Well that works, but can it be improved? Yes, it can. Here is my story of improvement

  • Adding direct output of variables in the msgbox
  • Adding a way to “disable” all Pause commands in all Sequences

Let us start with adding environment variables, the only thing we need to do is to use the variables that are stored in the task sequence and the print out the information on the screen if everything is working it should look something like this when you run it:


the LTIPause.vbs should look like this:

Set env = CreateObject(“Microsoft.SMS.TSEnvironment”)
MsgBox “Pausing Task Sequence, click OK to continue…” & chr(13) & _
” ” & chr(13) & _
“Computername:” & chr(9) & chr(9) & env(“OSDComputername”) & chr(13) & _
“IPAddress001:” & chr(9) & chr(9) & env(“IPAddress001”) & chr(13) & _
“DefaultGateWay001:” & chr(9) & env(“DefaultGateway001”) & chr(13) & _
“Phase:” & chr(9) & chr(9) & chr(9) & env(“Phase”) & chr(13) & _
“Make:” & chr(9) & chr(9) & chr(9) & env(“Make”) & chr(13) & _
“Model:” & chr(9) & chr(9) & chr(9) & env(“Model”) & chr(13) & _
“VMPlatform:” & chr(9) & chr(9) & env(“VMPlatform”) & chr(13) & _
“TaskSequenceID:” & chr(9) & chr(9) & env(“TaskSequenceID”) & chr(13) & _
“TaskSequenceName:” & chr(9) & env(“TaskSequenceName”) & chr(13) & _
“TaskSequenceVersion:” & chr(9) & env(“TaskSequenceVersion”) & chr(13) & _
“ViaServerConfig:” & chr(9) & chr(9) & env(“ViaServerConfig”) & chr(13) & _
“ImageFlags:” & chr(9) & chr(9) & env(“ImageFlags”) & chr(13) & _
“ImageBuild:” & chr(9) & chr(9) & env(“ImageBuild”) & chr(13) & _
“SLShare:” & chr(9) & chr(9) & chr(9) & env(“SLShare”) & chr(13) & _
“SLShareDynamicLogging:” & chr(9) & env(“SLShareDynamicLogging”) & chr(13) & _
“DeployRoot:” & chr(9) & chr(9) & env(“DeployRoot”) & chr(13) & _
“DriverGroup001:” & chr(9) & chr(9) & env(“DriverGroup001”) & chr(13) & _
“DriverGroup002:” & chr(9) & chr(9) & env(“DriverGroup002”) & chr(13)_
, 0, “LTIPause”

Sorry for all the chr, that’s just VB formatting and not needed for functionality but it looks better this way. You can add all kind of variables and their corresponding values. (look for Properties in the help, that will get you some of them) So now you have the script, just save it as LTIPause.vbs in the scripts folder and add it to the step you would like the the Task Sequence to pause, like this:


Now, instead of removing the pauses in your task sequences you can keep them and just disable them or you can set a condition on these commands and that I do. I add the following to my CustomSettings.ini

Properties=MyCustomProperty, TestMode


and then in the task sequence you just set this as a condition to run the command like this:


as long as TestMode is set to Enable it will run the command LTIPause at the locations you have decided by putting in LTIPause.vbs script.

If you are testing your Task Sequence from a command line you can also add /TestMode:ENABLE so it would look like this:

\\server\share$\scripts\litetouch.vbs /TestMode:ENABLE

That would result in the same thing.

You might want to read a bit more on this subject:

/mike aka The Deployment Bunny

3 replies »

  1. Pingback: Chris Nackers
  2. I don’t know if anybody else has had an issue with quotes in the above, but when I copied and pasted the script into a text file and changed it to .vbs it failed to run. The issue was that all the quotes came through as something that looks like quotes but are not seen by cscript as quotes. Only when I had to replace accidentally deleted quotes did I notice the difference between the ones pasted in and the ones I typed. search and replace all the pasted quotes with typed quotes and script worked.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.