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 (14)
  1. Anonymous says:

    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.

  2. Anonymous says:

    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

  3. Anonymous says:

    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!

  4. Anonymous says:

    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.

  5. RitaSage says:

    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.

  6. dlabaja@hotmal says:

    ich möchte gerne wissen ob diese 20010 wichtig ich

  7. Jon Wiswell says:

    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.

  8. Peete says:

    Any why to show only task sequences (of their folders) based on the group member ship in AD?

  9. cenicienta says:

    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

  10. OIFVET says:

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

  11. OIFVET says:

    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

  12. ZeusABJ says:

    Hey Michael,

    Can you explain the use of the word "For" in this line:

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

    Because it would not work for me until I took it out, like so:

    oXMLAppList.sSelectionProfile = oEnvironment.Substitute("%TaskSequenceID%")

    Is it just a typo or am I doing something wrong?

  13. showbox says:

    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’.

  14. aw says:

    hai, I just want to tell you that I am just very new to blogs and seriously loved this website. More than likely I’m planning to bookmark your blog post .
    You amazingly come with really good posts. Thanks a lot for sharing your blog Microsoft.

    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Palembang
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Papua
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Papua%20Barat
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Pati
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Pekalongan
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Pontianak
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Samarinda
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Semarang
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Serang
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Sidoarjo
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Surabaya
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Surakarta
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Tangerang
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Tasikmalaya
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Yogyakarta
    http://www.lokerjobindo.com/search/label/Loker%20Jurusan%20Akunting
    http://www.lokerjobindo.com/search/label/Loker%20Jurusan%20Asuransi
    http://www.lokerjobindo.com/search/label/Loker%20Jurusan%20Teknologi%20Informasi
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Administrasi
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Akuntansi
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Alfamart
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Arsiparis
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Artis
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Astra
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Asuransi
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Auditor
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Bank
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Bank%20BJB
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Bank%20BNI%20Syariah
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Bank%20BRI
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Bank%20Danamon
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Bank%20Mandiri
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Bank%20Indonesia
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Bank%20BCA
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Bank%20BTN
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Bank%20CIMB%20NIAGA

Comments are closed.