Revisiting LTI deployment wizard application selection profiles

A few years back, I posted a blog at https://blogs.technet.com/b/mniehaus/archive/2010/06/11/selection-profiles-with-the-lite-touch-deployment-wizard.aspx describing how to modify the Lite Touch wizard so that the deployment wizard shows a different list of applications based on the task sequence that was selected.  This worked fine with MDT 2010 Update 1, but there have been a few changes to the scripts and the structure since then.  So how do you need to do it now?  Well, it hasn’t changed much, but just enough to break things.

First, the script that you need to modify is now DeployWiz_Applications.vbs.  This script contains the logic that is specific to the application wizard pane.  (In MDT 2012, the wizard was split up so that each pane uses its own wizard files, see https://blogs.technet.com/b/mniehaus/archive/2012/03/01/3474394.aspx for more details.)  The logic that needs to be changed is in the same “IsThereAtLeastOneApplicationPresent” function, but one of the variable names was changed from “oXMLAppList” to “g_oXMLAppList” to reflect that it is a global variable.  So now the logic needs to be changed to look like this:

image

So the first line is changed from:

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

to:

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

and the second section is added:

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

The key changes from the original version are highlighted above.  So that’s all there is to it, now the logic should work fine with MDT 2012 and MDT 2012 Update 1.