You can create subsections in the Customsettings.ini file based on the value of a property using the Subsection directive. The value of the Subsection directive can be used to dynamically reference subsections that can be used to group configuration settings.
Listing 2 illustrates an excerpt of a CustomSettings.ini file that uses the Subsection directive to dynamically reference subsections based on the computer model, which is specified in the Modelproperty.
Listing 2. Using the Subsection Directive to Dynamically Reference Subsections in the CustomSettings.ini File
[Settings]
Priority=Make, Default
[Default]
[Contoso Computer Corporation]
Subsection=Contoso-%Model%
[Contoso-MDT 6600]
Packages001=XXX00009:Program9
Packages002=XXX0000A:Program10
[Contoso-MDT 2431]
Packages001=XXX00003:Program2
Packages002=XXX00003:Program4
In Listing 2, the Priority line contains the Makeproperty, which is used to references subsections based on the value of the Makeproperty. The “Contoso Computer Corporation” subsection is referenced when the value of the Makeproperty is equal to "Contoso Computer Corporation".
The “Contoso Computer Corporation” subsection contains a Subsection line that references other subsections based on the value of the Modelproperty. In this example, the “Contoso-MDT 6600” and “Contoso-MDT 2431” sections will be processed by MDT depending on the value of the Modelproperty.
Related Topics