Settings per Task Sequence using MDT 2010

By arwidmark / May 24, 2010

This is a quick guide for configuring settings per task sequence using MDT 2010, without the use of the database…

Some background info…
The Gather action in MDT is the process that gather all rules and it is run when the deployment wizard starts. But what if we want to set rules depending on what we select in the wizard? Well, then we simply have to run Gather once more, but after the wizard.

The following is a sample for configuring a few settings for a Windows 7 Task Sequence with id W7-X86-001, and some other setings for a Windows 7 Task Sequence with id W7-X86-002 .

1. Configure the two Task Sequence’s to run Gather local data and process rules (Rules file: customsettings.ini)

2. Update the deploymentshare rules (customsettings.ini) with the following

[Settings] Priority=TaskSequenceID, Default

[Default] OSInstall=Y
SkipAppsOnUpgrade=NO
SkipAdminPassword=YES
SkipProductKey=YES
SkipBDDWelcome=YES
SkipComputerName=YES
SkipDomainMembership=YES
SkipUserData=YES
SkipCapture=YES
DoCapture=NO
SkipLocaleSelection=YES
SkipTaskSequence=NO
SkipTimeZone=YES
SkipApplications=YES
SkipBitLocker=YES
SkipSummary=YES
SkipBDDWelcome=YES
TimeZone=004
TimeZoneName=Pacific Standard Time

[W7-X86-001] JoinDomain=TSLAB
DomainAdmin=TSLAB\JoinAccount
DomainAdminPassword=P@ssw0rd
MachineObjectOU=ou=Workstations,dc=tslab,dc=net
Applications001={785633b7-283b-420e-a4a3-2557377d204c}
Applications002={c47087e9-220e-4191-930e-819cf03e7cfe}

[W7-X86-002] JoinWorkgroup=WORKGROUP
Applications001={5e731fe1-ef93-44f9-bb17-8f7a5734cec8}
Applications002={c47087e9-220e-4191-930e-819cf03e7cfe}

/ Johan

About the author

arwidmark

baatch - May 25, 2010

Hi Johan, can you control the wizard pages depending on which task sequence id is chosen?

SnakeByte - May 27, 2010

Hi Johan
Is it possible to create a task sequence that only boots up into recovery console and nothing else ?
If yes – how ?

SnakeByte - May 27, 2010

Hi again Johan

Never Mind – i found out my self.
i followed the below guide, and then added the created Wim file.
http://bink.nu/news/how-to-replace-default-windows-7-server-2008-r2-recovery-environment-in-diagnostic-and-recovery-toolset.aspx?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+binkdotnu+%28Bink.nu%29

Dan Van Drunen - May 27, 2010

Looks like you beat me to blogging this one Johan. I was in the process of documenting the process you helped me with on this subject.

I would like to add a small detail that I ran into. If you have a deployment database configured, and you use this method to control your task sequences, some values in the database take precedence EVEN if the priority is set correctly in your customsettings.ini

As per Johan’s 2nd TS, [W7-X86-002] JoinWorkgroup=WORKGROUP. If you have specified a value for JoinDomain in the database (in the Locations table for example), it will take precedence over the value provided in the customsettings.ini.

I would like to hear if someone else could reproduce this to confirm my findings. Could this be considered a bug?

Seanlv - August 23, 2010

Hi Johan,
1, can I set the following in [W7-X86-001]?
[Settings]
Priority=TaskSequenceID, Default
[W7-X86-001]
SkipLocaleSelection=YES
UILanguage=zh-CN
UserLocale=zh-CN
KeyboardLocale=zh-CN

2, And is the guide applied to MDT 2008 Update1?

I have no luck on my MDT 2008 U1 environment.

arwidmark - August 23, 2010

Assuming you do install that language pack as part of the task sequence (adding it to packages) it should do fine, even with MDT 2008 U1. You can review the ztigather.log and zticonfigure.log files on the client for troubleshooting.

Seanlv - August 24, 2010

Thank you, Johan. Actually, I am supporting a software Testlab to install various MS OS everyday. Previously, the requirement is only to deploy OS in English edition. Recently, it would be cover some Chinese Lang OS. As a result, it’s not related to Language Pack.
I would take your suggestion soon to check related log. thanks.
From yesterday testing, I found if same varible defined in both [Default] and [WX-X86-001] in cs.ini, for example, I have UserLocale=en-US KeyboardLocale=en-US defined in [default] section, the varible defined in [default] section always has the 1st priority, no matter I set

[Settings]
Priority=TaskSequenceID, Default

or

[Settings]
Priority=Default, TaskSequenceID

Is it by design? and what is the best way to achieve my goals?

thanks in advanced.

kev.schu - August 27, 2010

So, I’ve tried doing this and the TaskSequenceID is getting ignored.

[Settings]
Priority=TaskSequenceID, Default
Properties=MyCustomProperty

[Default]
OSInstall=Y
SkipAdminPassword=YES
SkipApplications=YES
SkipAppsOnUpgrade=YES
SkipBDDWelcome=YES
SkipBitLocker=YES
SkipCapture=YES
SkipComputerName=NO
SkipComputerBackup=YES
ComputerBackupLocation=NONE
SkipDeploymentType=NO
SkipFinalSummary=NO
SkipLocaleSelections=YES
KeyboardLocale=en-US
UserLocale=en-US
UILanguage=en-US
SkipProductKey=YES
SkipSummary=YES
SkipTimeZone=YES
TimeZone=004
SkipUserData=NO
UserDataLocation=AUTO

USMT3=YES

[SALE]
SkipComputerName=YES
OSDComputerName=%AssetTag%
SkipDomainMembership=YES
JoinWorkgroup=WORKGROUP

I have the task sequence rule looking for CustomSettings.ini. Any idea why this may not be working?

arwidmark - August 27, 2010

Need the logfiles to troubleshoot, can you upload them somewhere and post the link

/ Johan

Seanlv - August 30, 2010

it seems kevschu’s problem is similar to my question, because I noticed kevschu also have same variable (SkipComputerName) defined in [default] and [SALE].

the varible defined in [default] section always has the 1st priority?

arwidmark - August 30, 2010

It depends on the variable, some of the variables are configured for last write wins (like deployroot), but most of them are configured for first writer wins (e.g following the priority list order).

Check the ZTIGather.log for info on how the rules are processed.

/ Johan

Martin - February 17, 2011

Soo.. you want ‘me’ to create a NEW gather…?
I tried changing the already present gather to use customsettings.ini and that DID NOT go well.. it failed installing because it could not find unattend.xml.
as soon as I defaulted the gather step, it worked again.

arwidmark - February 17, 2011

Most likely a typo, I have been using this quite a lot… try configuring full processing without specifying the cs.ini, and please note that there are multiple Gather actions in the task sequence.

If it still fails for you, zip up the logs, upload them somewhere, and post the link.

Martin - February 17, 2011

Hi Johan.

This is my cs.ini: http://www.2shared.com/file/AMs12UBT/cs_online.html

I had it working the 1st time I set it up, but ack.. I broke it somehow..
I am trying to run 3 TS, and if I choose 1 ts, then the rules in cs.ini which has the ts ID should be used…

I have NOT changed anything in gather yet.. and it worked before I did this….

I think you were right about the typo.. at least I cannot reproduce the error.

Martin - February 17, 2011

and yes.. I realize that there are redundant info in default.

arwidmark - February 17, 2011

Looks pretty much ok to me, I do need the logs to see what really happens…

/ Johan

Martin - February 18, 2011

Hi Johan.

Here are the log files..
This is a fresh set. I just ran the deployment AND I added CustomSettings.ini to the Gather task

I included a screendump of the gather action in the .rar file.

http://www.2shared.com/file/yqCYz8kg/osdlogs.html

Martin - February 18, 2011

Hi

I ran a little test.
In the cs.ini file I added:
[TaskSequenceID]
_SMSTSORGNAME=Johnny

just to test if it would grab this info…

and lo and behold.. it did..

So it’s not replacing tasksequenceID with the ts I choose in the TS wizard pane.

Here’s the log file for the new experiment:

http://www.2shared.com/file/K6veXEpS/DeploymentLogs.html

Martin - February 18, 2011

reading your answer here:
http://social.technet.microsoft.com/Forums/sr-Latn-CS/mdt/thread/53a64657-dce8-48d4-8ba9-6e1bee59716d

You say that what I am also trying to do, will not work?

I want to give the operator the choice between 3 tasksequences.
And based on his choice he will be presented with a joindomain wizard which contains different data. Mostly this is different choices of OU’s.

Using a hack found here:
http://social.technet.microsoft.com/Forums/en-US/mdt/thread/84831d92-b69a-493b-8dc8-3e0efb419242/
I can make it rerun the ztigather file and this provides a ‘soso’ solution but it takes a “long” time since it has to run the whole gather process again.

I really hope for a good solution here!!

Martin - February 18, 2011

I tried changing the gatherlocal to use a cs file called CustomSettings_HEF.ini

This it completely ignores… nowhere in the bddlog is this file “mentioned”.
it’s not until the prestage install that it mentions the customsettings.ini file at all.

arwidmark - February 18, 2011

Well, you can control the wizard this way, it’s only for deployment settings, not for the wizard settings…

What you could do is either customize the wizard, or just pop a small custom wizard before the real wizard starts, selecting the TS, and then, since it’s selected before the wizard, it will behave differently depending on selection…

A similar “prompting” solution was posted by good friend and fellow Mikael Nystrom. http://itbloggen.se/cs/blogs/micke/archive/2011/01/26/password-or-pin-code-protect-mdt-2010-litetouch.aspx

/ Johan

Martin - February 19, 2011

Hi Johan.
But as you write:

The Gather action in MDT is the process that gather all rules and it is run when the deployment wizard starts. But what if we want to set rules depending on what we select in the wizard? Well, then we simply have to run Gather once more, but after the wizard.

That sounds like I CAN control it as I want.
1. choose a TS.
2. joindomain settings are set according to my selection and I can choose ou’s etc according to the TS selected?

But it needs to run gather again?

arwidmark - February 19, 2011

Exactly, “normal” settings, e.g. non-wizard-skip-pane-style-etc settings works fine this way… Also note that depending on priorities, if a value is already set it will not be reset. Most MDT values are first-value-wins

You can also set a variable directly in the Task Sequence (using the Set Task Sequence Variable action). That value will override previously set values.

/ Johan

seanels - March 14, 2011

Hi Johan,

Is it possible to have custom sections in the customsettings.ini based on the platform (e.g. physical or virtual).

I am trying to keep the same deployment share and task sequences for physical and virtual deployments, but I want different things to happen in customsettings.ini based on the platform. I have done this already in the task sequence using the isVM and VMPlatform variables, but how could I do the same in the customsettings.ini file? e.g.

[Settings]
Priority=VMPlatform,Default

[isVM=TRUE]
Do this

[isVM=FALSE]
Do that

seanels - March 14, 2011

I got the answer from another forum:

[Settings]
Priority=Default,ByPlatform

[ByPlatform]
Subsection=VM-%IsVM%

[VM-True]
Do this

Thanks

Wibo - July 25, 2011

Hello Johan,

Should this also work for the installation of WinXp?
Because I don’t get it to work. I used your sample with some changes of course. This is how it looks like:

[Settings]
Priority=TaskSequenceID, Default
Properties=MyCustomProperty

[Default]
OSInstall=YES
SkipAdminPassword=YES
SkipApplications=YES
SkipAppsOnUpgrade=YES
SkipBDDWelcome=YES
SkipBitLocker=YES
SkipCapture=YES
SkipComputerName=NO
SkipComputerBackup=YES
SkipDeploymentType=YES
DeploymentType=NEWCOMPUTER
SkipDomainMembership=YES
JoinDomain=smokey.local
DomainAdmin=Administrator
DomainAdminDomain=smokey
DomainAdminPassword=Doma!n
SkipFinalSummary=NO
SkipLocaleSelection=YES
KeyboardLocale=en-US
UserLocale=en-US
UILanguage=en-US
SkipPackageDisplay=YES
SkipProductKey=YES
SkipSummary=YES
SkipTaskSequence=NO
SkipTimeZone=Yes
TimeZone=110
TimeZoneName=W. Europe Standard Time
SkipUserData=Yes

[WIN-XP-DESKTOP]
_SMSTSORGNAME=Test
JoinDomain=smokey
DomainAdmin=smokeyadministrator
DomainAdminPassword=Doma!n
MachineObjectOU=OU=Computer,dc=smokey,dc=local

[WIN-XP-LAPTOP]
_SMSTSORGNAME=Test
JoinDomain=smokey
DomainAdmin=smokeyadministrator
DomainAdminPassword=Doma!n
MachineObjectOU=OU=Computer,OU=Laptops,dc=smokey,dc=local

When I remove the [ ] from the first TaskSequence then I’ll see the Organization Unit filled with OU=Computer,dc=smokey,dc=local

I dont understand why it’s not working for me.

Hopefully you can help me out here.

arwidmark - August 5, 2011

You need to configure the Gather action in the Task Sequence for full processing to get the new values. Please upload your bdd.log file somewere and post the link.

/ Johan

Seth - August 17, 2011

We are trying to implement MDT 2010 and are also running into problems with the customsettings.ini.

We are trying to have specific task sequences apply SKIPDOMAINMEMBERSHIP but we are unable to get this to apply unless it is in the [DEFAULT] group. Is this one of the variables that has to be applied at the [DEFAULT] group?

Is there a list or help item in the MDT that explains which variables can be applied to other groups in cs.ini and which ones have to be applied to the [DEFAULT] group?

We have set our priority = TASKSEQUENCEID, DEFAULT but this doesn’t seem to be followed correctly because when we turn off SKIPDOMAINMEMBERSHIP but leave the JOINWORKGROUP=[something different than WORKGROUP] in a specific [tasksequenceid] group it still has WORKGROUP applied in the wizard. So I take it that [DEFAULT] is the only thing applied during the wizard and every other group is applied when the task sequence starts?

[Settings]
Priority=TaskSequenceID, Default

[Default]
OSInstall=Y
SkipAppsOnUpgrade=YES
SkipCapture=NO
SkipAdminPassword=YES
SkipProductKey=YES
SkipBitLocker=YES
SkipLocaleSelection=YES
KeyboardLocale=en-us
UserLocale=en-us
InputLocale=0409:00000409
SkipTimeZone=YES
TimeZone=004
TimeZoneName=Pacific Standard Time
UserDomain=XXXXXXXXXXXXXXXXXX
UserID=XXXXXXXXXXXXXXXX
UserPassword=XXXXXXXXXXXXXXXX

[TEST]
SkipDomainMembership=YES
JoinWorkgroup=TSS
SkipFinalSummary=YES

[7]
SkipDomainMembership=YES
JoinWorkgroup=TSS
SkipFinalSummary=YES

[11]
SkipDomainMembership=YES
JoinWorkgroup=TSS
SkipFinalSummary=YES

arwidmark - August 20, 2011

Sorry, it will not work that way, once the wizard has started, it will not change the panes because something you select in the wizard. Simply put, the wizard settings are read before the wizard starts.

You would need to customize the wizard to achieve what you want, or provide a custom prompt for task sequence selection before the real wizard is used.

/ Johan

Matt - September 14, 2011

I have been fighting over this simple problem and cant figure out why this cs.ini does not work. I want to install a set of apps too all machines (Desktops/Laptops) and just one app if it’s a laptop.

[Settings]
Priority=ByLaptopType, Default
Properties=MyCustomProperty

[Default]
OSInstall=YES
SkipAppsOnUpgrade=YES
SkipCapture=YES
SkipProductKey=YES
SkipBDDWelcome=YES

Packages001=PRI000CE:Per-system unattended – GS

[ByLaptopType]
Subsection=Laptop-%IsLaptop%

[Laptop-True]
Packages024=PRI000CD:Install VPN

What am I doing wrong? Thanks!!!

arwidmark - September 14, 2011

In [Laptop-True], set
Packages001=PRI000CD:Install VPN

You have one sequence per section. And make sure the default install applications step is present in the task sequence.

/ Johan

Matt - September 15, 2011

Thanks Johan, That fixed it!! As always you saved the day!

mdt_mishap - September 19, 2011

Johan, you mentioned that some MDT variables are first-value-wins and some are last-value-wins — I am particularly concerned with DestinationLogicalDrive. I’m having a horrible time with trying to set this. From a vanilla Refresh task sequence using MDT 2010 U1, ZTIGather.log indicates that this variable is set in two places — PreInstall’s Gather local only, and State Restore’s Gather local only task sequences.

What can I do to ensure that the value that I set for DestinationLogicalDrive persists throughout the deployment process?

If you can, would you mind taking a look at the thread I opened on Microsoft Forums: http://social.technet.microsoft.com/Forums/en-US/mdt/thread/c7ebd463-e1f2-4673-84ab-1a49cf8f7dec/?prof=required

thanks!!!

arwidmark - September 20, 2011

I have answered in the Microsoft Forum.

/ Johan

woozer - October 10, 2011

Hi Johan,
I’ve also been struggling with installing mandatory applications via the CS.ini (we don’t have an MDT DB setup). I have a different application versions that need to install on different hardware model. Any help will be much appreciated.

Here’s a copy of my CS.INI.
[Settings]
Priority=Default,ByModel
Properties=MyCustomProperty

[Default]
OSInstall=Y
ScanStateArgs=/v:5 /o /c
LoadStateArgs=/v:5 /c /lac
UserDataLocation=AUTO

SkipTaskSequence=NO
TaskSequenceID=DEPLOYWIN7X64CAP
SkipProductKey=YES
SkipApplications=NO
SkipPackageDisplay=NO
SkipComputerName=YES
SkipDomainMembership=YES
SkipComputerName=YES
SkipComputerBackup=YES
ComputerBackupLocation=NONE
SkipLocaleSelection=YES
KeyboardLocale=en-US
UserLocale=en-US
UILanguage=en-US
SkipTimeZone=Yes
TimeZoneName=Pacific Standard Time
SkipAdminPassword=YES
AdminPassword=xxxxxxxxx
SkipBitLocker=YES
SkipUserData=YES

[ByModel]
Subsection=Model-%Model%

[Model-HP EliteBook 8560w]
MandatoryApplications001={37f3ee26-559f-43c7-8729-f887b033f7b6}

Thanks.

arwidmark - October 11, 2011

Use the following cs.ini:

[Settings]
Priority=Default,Model

[Default]
OSInstall=Y
ScanStateArgs=/v:5 /o /c
LoadStateArgs=/v:5 /c /lac
UserDataLocation=AUTO

SkipTaskSequence=NO
TaskSequenceID=DEPLOYWIN7X64CAP
SkipProductKey=YES
SkipApplications=NO
SkipPackageDisplay=NO
SkipComputerName=YES
SkipDomainMembership=YES
SkipComputerName=YES
SkipComputerBackup=YES
ComputerBackupLocation=NONE
SkipLocaleSelection=YES
KeyboardLocale=en-US
UserLocale=en-US
UILanguage=en-US
SkipTimeZone=Yes
TimeZoneName=Pacific Standard Time
SkipAdminPassword=YES
AdminPassword=xxxxxxxxx
SkipBitLocker=YES
SkipUserData=YES

[HP EliteBook 8560w]
MandatoryApplications001={37f3ee26-559f-43c7-8729-f887b033f7b6}

woozer - October 12, 2011

Thanks for the quick response. I’m obviously doing something wrong. Do the mandatory applications install after the second reboot, before the final summary screen? I added some “Install Application” tasks at the end of my Task Sequence, so I’m not sure if that is causing problems.

arwidmark - October 12, 2011

The default Install applications action (set to install multiple applications) must be present in the task sequence. If it still fails, upload the bdd.log file somewhere and post the link here.

/ Johan

Brian KS - January 14, 2012

Old post, but we were a little late to the game at my shop. Quick question:

If I do this:

——————————————
[Default]
MandatoryApplications001={some_GUID}

[W7-X86-001]
MandatoryApplications001={some_other_GUID}
——————————————

And I pick the W7-X86-001 task sequence, will it override the [Default] setting MA001? Here’s the setup: if I have 4 task sequences, and I want one application installed on all 4, and several other custom ones on the differing sequences, do I need to set it up more like this?

——————————————-
[Default]
MandatoryApplications001={GUID}

[W7-X86-002]
MandatoryApplications002={added GUID}

[W7-X86-003]
MandatoryApplications002={yet another GUID}
——————————————-
etc?

Thanks for all of your excellent tutorials!!

arwidmark - January 17, 2012

The MandatoryApplications is an array, every section that adds an app will udpate the array.

Assuming you configure the Gather action in the Task Sequence, the apps will be added. Please note that you need to have MandatoryApplications001 in each section, that is startig with 001, in each section.

/ Johan
/ Johan

Brian KS - January 17, 2012

Fantastic. That’s exactly what I needed to know. Thanks again Johan!

JoeDissmeyer - February 6, 2012

Hello Johan. First of I want to say thank you for sharing your knowledge with the rest of us on OS Deployment and MDT.

Some background on our MDT deployment setup:
-One central deployment share is shared between two campuses. All drivers, applications, base OS images, and selection profiles are shared between both campuses in the single MDT deployment share.
-One set of task sequences with custom CS.INI rules have been set up for one campus, and a completely different set of task sequences with different CS.INI rules have been set up for the other campus, all still within the same deployment share.
-Setting up a SQL Server Express database in our environment is forbidden, so in order to automate OS deployment as best we can, we must rely on the rules defined in CS.INI or inside of the task sequences themselves.
-We need to prioritize CS.INI rules based on the task sequence selected in the Deployment Wizard. “Default” is the ‘catch-all’. Setting each variable in each task sequence will take a very long time to do, which is why we want to process the rules in CS.INI instead. Also, this will allow us to make changes quickly and easily without having to manually edit the TS itself.

Issue:
I configured my Task Sequences to run Gather local data and process for customsettings.ini as stated in your original post for my MDT 2010 deployment share. However, I ran into the exact same issues that everyone else was having with this process. The rules set in the “default” section of CS.INI were processing just fine, but the task sequence sections were getting skipped over completely.

Resolution:
You explained in many other online posts and forums that the reason why this is happening is because customsettings.ini is processed BEFORE the MDT Wizard displays onscreen. In order to fix the problem, we need to process the rules in customsettings.ini again after the task sequence has been selected in the Deployment Wizard.

After much trial and error, following your instructions above, and after editing the DeployWiz_Validation.vbs script according to this post (http://www.myitforum.com/forums/PerTaskSequence-variables-and-making-them-apply-in-Deployment-Wizard-m225509.aspx), settings per task sequence now works perfectly for my deployment.

Thanks again Johan for your excellent tutorials. I haven’t bought your book just yet, it is on my shopping list 🙂 I am looking forward to your posts on MDT 2012.
-Joe Dissmeyer
http://www.joedissmeyer.com
joe@joedissmeyer.com

Comments are closed