OS Deployment – Adding a Wizard to control the Task Sequence behavior when you create a Reference Image

If you are in the business of doing Reference Imaging you want that process to be as automated as possible, but now and then you need to verify that different part of the task sequence works, lets say that you need to verify that an application you added to that task sequence get installed correctly, at time you don’t really like to run trough the entire Windows update process. Easy fix, you open the Task Sequence and disable it, but what if you could do some thing like this instead…A quick Note before you begin: This is not supported, since includes a modification a ZTIConfig.vbs and credit goes to Keith Garner for the explaining how to do that modification. Thanks!

I have done demos on this topic for some time now and I have promised to post this, so for all of you attending MMS in MN, TechDays and other various events, here you have it.


If that is what you want, here it is.

Adding the Suspend Step

The Suspend Step is a function that is built-in to MDT, but you need to add it. After you have done that the task sequence will suspend at that step and you can perform manual tasks, or test and verify that things works as expected. When you are done, just hit the “Resume Task Sequence” icon that will be on the desktop. Extremely useful, but instead of enable/disable by modifying the task sequence, it is nice to have that as checkbox.

Open your Task Sequence and browse to: State Restore \ Custom Tasks (My folder has been renamed to “Custom Tasks Post WU) and add a Run Command Line using the following settings:

  • Name: Suspend
  • Command Line: cscript.exe “%SCRIPTROOT%\LTISuspend.wsf”

The Suspend Step has been added.

Adding Conditions to the Steps.

We need a couple of Properties that we can use, let us use SuspendTS, DisableApps and DisableWSUS, add the following settings to the following steps in the Task Sequence.

For the Windows update steps, add the following Task Sequence Variable.

  • Variable: DisableWSUS
  • Condition: not equals
  • Value: NO

One of the Windows Update Step has the condition set, don’t forget to set them both.

For the Application install group steps, add the following Task Sequence Variable.

  • Variable: DisableApps
  • Condition: not equals
  • Value: NO

The group that install all the Applications has the correct condition set.

For the Suspend Task Sequence step, add the following Task Sequence Variable.

  • Variable: SuspendTS
  • Condition: equals
  • Value: YES

The Suspend Step Condition changed according to the list above.

Create an Application Bundle

We need a application bundle, the application bundle will actually not install anything at all, instead it is going to be the place holder for the HTML code. I recommend that you have all the “applications” you don’t want to see in a set of folders and this application in an other folder, or directly in the root, because this application should be seen, so you can “fill out the form”.

Create the Application Bundle using the following settings:

  • Application Type: Application Bundle
  • Application Name: Deployment Settings

The application Bundle has been created in the Config Folder.

Add HTML code to the Application Bundle

Open the Application Bundle and the the following HTML code to the comments field

<td>Enable Suspend Task Sequence</td>
<td><INPUT type="checkbox" Name="SuspendTS" value="YES" /></td>
<td>Disable  Windows Update</td>
<td><INPUT type="checkbox" Name="DisableWSUS" value="NO" /></td>
<td>Disable Application Install</td>
<td><INPUT type="checkbox" Name="DisableApps" value="NO" /></td>

Note:Make sure that your " are real " and not the “Word edition”

HTML has been added to the Comments filed.

Enable HTML code to run in the Comments field

Time for the unsupported part, the change you are about to do will stop the Wizard from parsing the comments field as text.

In scripts folder, find the file named ZTIConfig.vbs, make a copy of it, open the ZTIConfig.vbs and find the following line (around Line 700)

sComments = EncodeXML(oItem.SelectSingleNode("./Comments").Text)

and replace it with this

sComments = oItem.SelectSingleNode("./Comments").Text

Save the file.

Modify your CustomSettings.ini

We need to be able to select applications, so make sure your customsettings.ini shows:

  • SkipApplications=NO
  • SkipSummary=NO

The setting SkipSummery can later be set to YES, the setting I suggest is just so that you can see that Variables are set correctly with the need to run trough the entire deployment when testing this.

CustomSettings.ini has been modified.

Hide all other applications

When running the wizard, I don’t need to see all the applications, since the have been added to my task sequence. So you can either open each and every application and enable the “Hide this Application” checkbox, or you can (if you have all the applications in folders, just disable the folder.


Create Your Reference Image using the new “Wizard”

Boot the VM, select your Task Sequence and enable/disable the item.

Note: You don’t really need to select the application, it is just used as place holder for the HTML code, I have however made the application a default application to avoid confusion as a MnadatorApplications001={GUID}

All item have been Selected.

All values have been set correctly.

Have Fun!


Question: Do I need to select the application:
Answer: No

Question: Why don’t you add a Wizard Page instead?
Answer: Because that is more complicated if you don’t know exactly how the wizard works, this method is in most cases good enough and can be done even if you don’t have any experience in modifying the Wizard, you can as an example just add a dropdown box to be able to select certain items

Question: Do you have any other example on how to use this?
Answer: Yes, a ton of them

Question: If I don’t need to wizard thing anymore, how to I disable it?
Answer: Since it is an application, disable the application

6 replies »

  1. Is it possible to make a selection box for driver installed ? So you have a choice that you want to install drivers or do not want to install.
    I like to hear if that is possible.
    you might achieve it for me?

  2. On a server installation , I want a password can be created for the built-in administrator account. it is possible and how?

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.