none
MDT CustomSettings.ini unlisted location value RRS feed

  • Question

  • Hi, I've been searching everywhere but neither official documentation nor anywhere online I've searched seems to address this situation.

    Using the DefaultGateway setting in CustomSettings.ini I can't find an option for 'unlisted' location do X. For example here's a sample script:

    [Settings]
    Priority=DefaultGateway,Default

    [DefaultGateway]
    10.2.5.254=Location1
    10.3.31.254=Location2
    10.3.55.254=Location3
    10.3.71.254=Location4
    ???=OtherLocation

    [Location1]
    ;Do location 1 actions here

    [Location2]
    ;Do location 2 actions here

    [Location3]
    ;Do location 3 actions here

    [OtherLocation]
    ;Do generic actions here for any other location

    What can I put for the ???  spot in this script so that if the DefaultGateway isn't one of the specified ones above, assume that the location is 'OtherLocation' and process that subsection in lieu if it doesn't know the location. The purpose for this rule is so that for locations where I can't outright define 'if you're this default gateway assume you're this location' I'll have it prompt the administrator to manually enter the location name.

    Thursday, January 7, 2016 6:57 PM

Answers

  • Just put it in the default Section.
    Your priority is set correctly for this already.

    (Should not cause issues with the other locations as the first setter usually wins, most values can not be overwritten once they have been set)

    Thursday, January 7, 2016 7:06 PM

All replies

  • Just put it in the default Section.
    Your priority is set correctly for this already.

    (Should not cause issues with the other locations as the first setter usually wins, most values can not be overwritten once they have been set)

    Thursday, January 7, 2016 7:06 PM
  • That won't work because I want unknown locations to trigger events before other parts of the script are run. Default would be the last section in priority to run. I need the unknown sites to trigger so that I can have a UserExit script cause the system to outright ask you what location the computer is at so that other tasks will then use the correct subsections.

    Zair

    Thursday, January 7, 2016 7:45 PM
  • After a bit of work I figured out what you were suggesting. I just had to make a lower priority section after DefaultGateway that would grab anything already missed.

    This does confuse me for later on though as say I have Location decide what software to install, but a lower priority task is 'IsLaptop' to install additional software for the laptop. If the location already told it what software to install, wouldn't it ignore the software listed on the lower priority 'IsLaptop' section??


    Zair

    Thursday, January 7, 2016 9:12 PM
  • Luckily the software from each section that is being processed gets added to a list, so they all apply :)
    I was very astounded myself when I first noticed this a few years back.
    A lot of Software was in the Default section and the VPN client was being installed on laptops only.

    However I am not doing this myself anymore as the database can make this more comfortable with roles.

    Edit: Thankfully I did use the word 'most' in the above reply - Couldn't remember this when I wrote it
    • Edited by oriooff Thursday, January 7, 2016 9:55 PM
    Thursday, January 7, 2016 9:52 PM