none
MDT 2012 - Customsetting.ini HP model variables

    Question

  • Good day to everyone!

    I've currently set up my Customsetting.ini to inject different driver package for each model on our network. This fonction is currently working great with most of our models, but for some HP model, the task is getting gruesome...

    Exemple: For the HP 6730b

    HP has put the actual "part number"... So for this model, when I run a query for the %model% I get the following :

    HP Compaq 6730b (FN020UT#ABC)

    HP Compaq 6730b (KS178UT#ABC)

    and so on... There's actually 7 or 8 different "part number" for this model...

    My actual CustomSetting.ini look like this at the moment for this model:

    [HP Compaq 6730b (FN020UT#ABC)]
    BitsPerPel=32
    VRefresh=60
    XResolution=1280
    YResolution=800
    DriverSelectionProfile=HP_Laptop_6730b

    [HP Compaq 6730b (KS178UT#ABC)]
    BitsPerPel=32
    VRefresh=60
    XResolution=1280
    YResolution=800
    DriverSelectionProfile=HP_Laptop_6730b

    And so on for all the "part numbers".

    My question is: Is the a way for me to put a "variable" so I dont have to explicitly put all the part numbers?!

    Ex:

    [HP Compaq 6730b*] or [HP Compaq 6730b%] or ...
    BitsPerPel=32
    VRefresh=60
    XResolution=1280
    YResolution=800
    DriverSelectionProfile=HP_Laptop_6730b

    Thanks in advance!

    Dominic


    Tuesday, April 30, 2013 7:08 PM

Answers

  • No way to use a wildcard in the section name to my knowledge, but you may still be able to accomplish what you want.  Check out this post of Mikael's (http://deploymentbunny.com/2013/03/06/back-to-basiccustomsettings-inisample-2/) that shows how to get more complex with CustomSettings.ini and use a UserExit script to clean up things before continuing the processing.  His AliasUserExit.vbs specifically does what you are looking for, and renamed "HP Compaq nw8240 (PY442EA#AK8)" to "HP Compaq nw8240".  This would allow you to keep your CustomSettings.ini pretty clean, as you'd only need that segment once and not even need to use variables.

    David Coulter | http://DCtheGeek.blogspot.com | @DCtheGeek

    Wednesday, May 01, 2013 12:57 AM
    Answerer

All replies

  • No way to use a wildcard in the section name to my knowledge, but you may still be able to accomplish what you want.  Check out this post of Mikael's (http://deploymentbunny.com/2013/03/06/back-to-basiccustomsettings-inisample-2/) that shows how to get more complex with CustomSettings.ini and use a UserExit script to clean up things before continuing the processing.  His AliasUserExit.vbs specifically does what you are looking for, and renamed "HP Compaq nw8240 (PY442EA#AK8)" to "HP Compaq nw8240".  This would allow you to keep your CustomSettings.ini pretty clean, as you'd only need that segment once and not even need to use variables.

    David Coulter | http://DCtheGeek.blogspot.com | @DCtheGeek

    Wednesday, May 01, 2013 12:57 AM
    Answerer
  • Thanks a lot!

    I've tested the solution and it is working perfectly! I ended up doing some modification to the script, but is does exactly what I wanted and its keeping the customsetting.ini much much cleaner.

    Thanks again!

    Wednesday, May 01, 2013 2:58 PM