I’ve talked with several people who have wanted to filter the list of items that are displayed in the Lite Touch wizard.  Fortunately, that’s pretty simple to do as you can set the WizardSelectionProfile task sequence variable via CustomSettings.ini to specify the name of the selection profile that should be used to do the filtering: only the folders in the selection profile will be displayed for task sequences, applications, and language packs.

That works great if you want to do some simple rules-based filtering, e.g. use a different selection profile for each site.  But let’s assume you want a different list of items for each task sequence (e.g. one list for Windows XP and another for Windows 7).  It sounds simple enough by creating a rule that specifies:


If you try it though, you’ll find out that it doesn’t work.  That’s because the TaskSequenceID variable hasn’t been set yet; CustomSettings.ini is processed before the wizard is displayed.

So to make this work requires a small script modification.  If you look in the scripts folder of your deployment share, you’ll find a file named “DeployWiz_Initialization.vbs”.  Search for the “IsThereAtLeastOneApplicationPresent” function.  In that function, you’ll find this line:

oXMLAppList.sSelectionProfile = oEnvironment.Item("WizardSelectionProfile")

That’s what tells the wizard to filter the application list using the value specified in WizardSelectionProfile.  Change that line to specify this instead:

oXMLAppList.sSelectionProfile = oEnvironment.Substitute("For %TaskSequenceID%")   ' MODIFIED

This modified line assumes that you have created a selection profile for each task sequence.  So if your task sequence ID was “WIN7” you would need a “For WIN7” selection profile.

If a selection profile with that name doesn’t exist, you’ll find that the list of applications is then completely empty.  That’s because all the folders are going to be filtered out by this line:

                set dXMLCollection = oXMLAppList.FindItems

So for safety, you might also want to add a little additional logic after that:

                ' INSERTED
                If dXMLCollection.count = 0 then
                                oXMLAppList.sSelectionProfile = oEnvironment.Item("WizardSelectionProfile")
                                Set dXMLCollection = oXMLAppList.FindItems
                End if
                ' END INSERTED

This logic basically falls back to the original WizardSelectionProfile name.  And if that value is blank, it means “display all items and folders”.

Notice that I tagged the changed and inserted lines – those are really just comments to help identify the changes I have made to the standard MDT scripts.  By tagging them, it makes it easier to find the changes that I need to reintegrate into my deployment share after upgrading MDT with a new update or hotfix.