Partager via


Selection profiles with the Lite Touch deployment wizard

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:

WizardSelectionProfile=%TaskSequenceID%

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.

Comments

  • Anonymous
    January 01, 2003
    I was wondering if you'd be able to show us how to make this same change in MDT 2012. I tried modifying that same function but in DeployWiz_Applications but it didn't work.

  • Anonymous
    January 01, 2003
    Yes, that should be all it takes.  If that isn't working, e-mail me the modified file that you are using (mniehaus@microsoft.com) and I'll check it out. -Michael

  • Anonymous
    January 01, 2003
    Hi Michael, Thanks for the clarification on how Selection Profiles are used.  Maybe it's just me, but it doesn't seem to be very clear in the MDT documentation. I do have a question....If I have a custom wizard pane that displays a list of roles, once a Role is selected, if I were to implement the WizardSelectionProfile based on that role, I would then be presented with my filtered task sequences, applications etc.  But I would also like this role to install a set of applications automatically.  So these always installed applications are not presented to the user, but the applications wizard still allows the user to choose additional apps on a per machine basis. If that's confusing....let's say these roles are applied via make/model, then I still want to be presented with a list of the rest of my applications to be installed on a per machine basis.   It seems to me that this would be a popular scenario, to have a base set of apps we want installed all the time, and then select additional apps at time of deployment..... Any thoughts? Thanks!

  • Anonymous
    January 01, 2003
    After some time the answer was revealed. (Thanks Mike H.) Due to the fact MDT 2012 breaks down the DeployWiz_Initalization, you have to go fishing a bit. In the end, if you open the DeployWiz_Applications.vbs. and search for "'Get the filtered list of applications" the same code as shown above can be inserted that use to be in the DeployWiz_Initialization.vbs and all is well. Oh you have to add a a G_ in front of the oXML like so: g_oXMLAppList.sSelectionProfile = oEnvironment.Substitute("%TaskSequenceID%")   ' MODIFIED Forgot I had an account been so long since I well logged in. Anway OIFVET is djhicks1 and djhicks1 is OIFVET. ;)  Hope this helps others.

  • Anonymous
    July 06, 2010
    Hi, I am very, very new to MDT, am having to learn it on my own, without any training.  So far, I've been able to get a couple of Dell images to work, but then I broke them when adding drivers for another model.  I'm using the "import the drivers, mainly cab files and let LiteTouch manage them" method.  Would the method described above help eliminate breaking functioning systems, when adding additional drivers?  Could you provide a more detail on how this works, and what I would need to do to accomplish this?  Thanks.

  • Anonymous
    July 12, 2010
    ich möchte gerne wissen ob diese 20010 wichtig ich

  • Anonymous
    July 21, 2010
    So if I understand correctly, I only need to create my Selection Profiles that are names "For <TaskSequenceID>" and then add your lines of code to my DeployWiz_Initialization.vbs file and everything should be great, correct? The problem I'm having is when it gets to the application selection portion I get a "424 Object Required" error. I'm not sure what I'm missing.

  • Anonymous
    January 21, 2011
    Any why to show only task sequences (of their folders) based on the group member ship in AD?

  • Anonymous
    March 15, 2011
    hola desearían me ayudaran estoy a punto de perder mi vivienda mi número de cuenta es 0019/5486/33/4210002336,por favor ayudadme,si no ingreso 2500 euros antes de este viernes ,la puedo perder porfavor,mi correo es cari-l-g@hotmail.com,porfavor comuniquense conmigo en español

  • Anonymous
    June 16, 2012
    Wondered how to do this same thing in MDT 2012? Is it done in a different script, XML file?

  • Anonymous
    June 16, 2012
    After some time the answer was revealed. (Thanks Mike H.) Due to the fact MDT 2012 breaks down the DeployWiz_Initalization, you have to go fishing a bit. In the end, if you open the DeployWiz_Applications.vbs. and search for "'Get the filtered list of applications" the same code as shown above can be inserted that use to be in the DeployWiz_Initialization.vbs and all is well. Oh you have to add a a G_ in front of the oXML like so: g_oXMLAppList.sSelectionProfile = oEnvironment.Substitute("%TaskSequenceID%")   ' MODIFIED

  • Anonymous
    January 24, 2013
    The comment has been removed

  • Anonymous
    November 23, 2015
    Thanks for the great info. I really loved this. I would like to apprentice at the same time as you amend your web site, how could i subscribe for a blog site?
    For more info on showbox please refer below sites:
    http://showboxandroids.com/showbox-apk/
    http://showboxappandroid.com/
    Latest version of Showbox App download for all android smart phones and tablets. http://movieboxappdownloads.com/ - It’s just 2 MB file you can easily get it on your android device without much trouble. Showbox app was well designed application for android to watch movies and TV shows, Cartoons and many more such things on your smartphone.
    For showbox on iOS (iPhone/iPad), please read below articles:
    http://showboxappk.com/showbox-for-ipad-download/
    http://showboxappk.com/showbox-for-iphone/
    Showbox for PC articles:
    http://showboxandroids.com/showbox-for-pc/
    http://showboxappandroid.com/showbox-for-pc-download/
    http://showboxforpcs.com/
    There are countless for PC clients as it is essentially easy to understand, simple to introduce, gives continuous administration, effectively reasonable. it is accessible at completely free of expense i.e., there will be no establishment charges and after establishment it doesn't charge cash for watching films and recordings. Not simply watching, it likewise offers alternative to download recordings and motion pictures. The accompanying are the strides that are to be taken after to introduce Showbox application on Android. The above all else thing to be done is, go to the Security Settings on your Android telephone, Scroll down and tap on 'Obscure sources'.