How to use different settings per Task Sequence with MDT 2012

July 20, 2012 - Deployment, MDT, MDT 2012

To use different settings for Task Sequence “A” and “B” you could use a SQL database, but in some environments that’s not possible, so the only way is to use the MDT rules.

First of all we need to change the first step in the Task Sequences. By default the “Gather local only” step is processing local rules only. Change this to “Gather local data AND process rules”, and specify your rules file, typical customsettings.ini:

Settings per Task Sequence

After this, open the customsettings.ini rules file, and add “TaskSequenceID” to the Priority list (on top of the file).

Priority=TaskSequenceID, Model, Default

On the bottom of the rules file, add two (or more) blocks. With the Task Sequence ID between brackets;



Next, backup the scripts\DeployWiz_SelectTS.vbs file, and open the original in a text-editor. Add the following lines:

After “Dim sTemplate”, add;

Dim sCmd
Set Oshell = createObject("")

Before, “End Function” add;

sCmd = "wscript.exe """ & oUtility.ScriptDir & "\ZTIGather.wsf"""
oItem = oSHell.Run(sCmd, , true)

To summarize the adaptations in DeployWiz_SelectTS.vbs:



Credits to:

3 thoughts on “How to use different settings per Task Sequence with MDT 2012

Greg Bray

AWESOME! Note you may need to also set the “Gather local only” step under preinstall to process rules for customsettings.ini, otherwise things like skipping the application section for specific tasks won’t work correctly.

Also if you have any custom task sequences that do not start with the gather step you should manually add that to prevent issues when using the back/next buttons in the wizard.

Mike Walker

I followed this guide when deploying MDT a few months ago, and it worked smoothly. I later tried to split out my settings into a different file, and realized that specifying the rules file (specified as the default ‘customsettings.ini’ in this post), doesn’t actually work. The default customsettings.ini is invoked regardless of what is entered in this text box (or if it left blank).

After some digging, this is because the ZTIGather.wsf script must be invoked with the file name parameter if you want to use a different file. Unfortunately, the value from the Task Sequence text box hasn’t been loaded.

I’ve posted an updated set of instructions on my blog ( that includes the changes needed to allow different files to be specified in the rules text box.

Ben De Vriese

Hey Mike,
Thanks for the feedback!

Comments are closed.