Banish GUIDs from CustomSettings.ini in MDT

Another of my pet peeves about MDT CustomSettings.ini rules is that fact that you have to define entries for Applications and ManditoryApplications as GUIDs.  Here is the example for Applications from the MDT help file:



In order to get the GUID for an application, you have to open the XML file which holds the Applications definitions - \<DeploymentShare>\Control\Applications.xml.  (Yes, the Deployment Workbench does display the GUID in the Applications list.  However, you cannot select the GUID to copy and paste it into CustomSettings.ini.)  When you open Applications.xml in a text editor the first thing you notice is that the contents of the file in all on a single line.


So now you are in for a bunch of scrolling right and hunting or turning on word wrap to find the GUID that you need.  You can alleviate this by first opening the XML file in XML Notepad ( and then clicking Save.  This will “prettify” the XML making it easier to find entries like so:



However, wouldn’t it be nicer if we could just use the Name of the Applications instead of the GUIDs?


To that end I have created a User Exit script, MDTExitNameToGuid.vbs, that allows just that.  There are two main functions that allow it to be used in two different ways.  If you have a property or a small number of List Item entries, use the ConvertNameToGUID function.  Here is an example:

Priority=Default, NameToGuid

Applications001=#ConvertNameToGUID("Contoso Application A 1.0", "Applications")#
Applications002=#ConvertNameToGUID("Contoso Application B 2.0", "Applications")#

The parameters for the ConvertNameToGUID function are (<Item Name in Deployment Workbench>, <Control folder XML file base name>).

If you have more than one or two entries for a List Item (like Applications or ManditoryApplications), then using the ConvertNameToGUIDInList function is more efficient.  This converts all text entries in the List Item to their corresponding GUIDs (and logs if no matching GUID is found for any entries).  Here is an example:

Priority=Default, NameToGuid

Applications001=Contoso Application A 1.0
Applications002=Contoso Application B 2.0
ConvertList=#ConvertNameToGUIDInList("Applications", "Applications")#

The parameters for the ConvertNameToGUIDInList function are (<List Item name>, <Control folder XML file base name>).

(Note: You can find a list of the MDT XML files in the Support Files topic in the MDT help file.)


Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the Terms of Use.

This post was contributed by Michael Murgolo, a Senior Consultant with Microsoft Services - U.S. East Region.

Comments (2)

  1. themightymrp says:

    Actually, in the MDT workbench you can copy the GUID from the application. Just highlight the line on the properties page and press Ctrl+C – works just fine

  2. ImabigDork says:

    Lol at the above comment. That's what I do, works fine. I don't mind it.

Skip to main content