In part 1 of this series, I showed you how to enable the Branding to Reg steps, so that during a Task Sequence some information about the Task Sequence is stored in the Registry under HKLM\Software\Microsoft\MPSD\OSD. In this part, we are going to extend the information which is written to include some information we want to include.

The Branding to Reg and Branding to Reg x64 steps, call two scripts which can be found in the Scripts folder under your MDT Files Package source location. When you open the scripts, you will notice that you can modify which values are written, or which variables you explicitly don’t want written to the Registry during the Branding steps, like OSDJoinPassword for example.


The parts we can modify in the scripts are in the beginning of the scripts, where the Constants are defined. Below you will see in bold the changes made for the purpose of this blogpost.

Const includeMap = “OSD;_SMSTSClientGUID;_SMSTSClientIdentity;USMT_;TSType;TSVersion;OldComputerName;

Both RSettings and Environment, are Task Sequence variables which I set on the collection to which which I add the machines. This collection then has a deployment of the Task Sequence.

RSettings is used in order to determine the Regional Settings and its value corresponds to a section in my customsettings.ini detailing the language and keyboard layout settings and Environment is used to set the environment of the task sequence during deployment. (Development, Test, Acceptance or Production) – Yes, this means that I have my Task Sequence deployed to several collections, and based on some variables which are set on the collection, my deployment behaves differently.


During SCCM OSD, the TSVersion variable isn’t available, so I’ve also decided to create Task Sequence variable in the beginning of my Task Sequence which sets the TSVersion Task Sequence variable to 1.0 in this case.


Important: Don’t forget to make the adjustments to both the OSDBranding.vbs and OSDBrandingx64.vbs files. Don’t forget to redistribute your MDT files package when you are finished with your modifications.

What’s also important to notice is that the modifications you made will be overwritten if you decide to update your MDT files with a newer version of the MDT Files Package, for example when MDT 2012 Update 3 of MDT 2013 comes out.

You can check if the added variables are branded to the registry by doing a machine deployment, and check if the RSettings and Environment keys are written under the HKLM\Software\Microsoft\MPSD\OSD Registry key.

After we have successfully set up the branding to the registry, we want to collect this information so that we can create collections based on this information. For example, create a collection of all machines which had the Environment environment variable set to Development during deployment. There are two ways to achieve this, first is to extend HW inventory by using the RegtoMof utility, but a better way in my opinion is to use Compliance Settings (the old Desired Configuration Management). Part 3 of this series details how to set up Compliance Settings and Compliance Baselines to read the systems and create collections based on the outcome.