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 (http://xmlnotepad.codeplex.com/) 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:
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:
Applications001=Contoso Application A 1.0
Applications002=Contoso Application B 2.0
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.)
This post was contributed by Michael Murgolo, a Senior Consultant with Microsoft Services - U.S. East Region.