programming4us
programming4us
DESKTOP

Windows Server 2008 and Windows Vista : Creating Custom ADMX and ADML Files (part 3) - Core ADMX File Concepts

1/18/2014 12:52:54 AM

5. Tying the ADMX and ADML Files Together

The ADMX file is responsible for creating the category and policy structure within the GPME, whereas the ADML file is responsible for the text for the category, policy, and any other elements used. Any number of ADML files can be used with a single ADMX file to create language-specific interfaces.

The policy section in the ADMX file creates each individual policy within the GPME. Because the policy must have associated text, the ADMX file must reference the ADML file to supply the correct text for the policy wording. To do this, use the presentation element in the policy statement, as shown in the following snippet from an ADMX file:

<policy name="Sample_Checkbox" class="Machine"
displayName="$(string.Sample_Checkbox)"
explainText="$(string.Sample_Checkbox_Help)"
presentation="$(presentation.Sample_Checkbox)"
key="Software\Policies\Examples">
<parentCategory ref="CHECKBOX_CATEGORY"/>
<supportedOn ref="windows:SUPPORTED_ProductOnly"/>
<elements>
<boolean id="Checkbox" valueName="ExampleCheckbox">
<trueValue>
<decimal value="1"/>
</trueValue>
<falseValue>
<decimal value="0"/>
</falseValue>
</boolean>
...

Note that the presentation element references the presentation.Sample_Checkbox variable. This variable is defined in the ADML file, shown here:

<presentation id="Sample_Checkbox">
<checkBox refId="Checkbox">Check box text</checkBox>
</presentation>

Because these two entries for presentation match and there are the same number of entries in both the ADMX and ADML file, the display should correctly show the check box with the “Check box text.”

Warning

If the ADML file does not have the exact same name as the ADMX file, the GPME will display an error, indicating that the ADML file is not available. Also, the ADMX file and the ADML file must contain the same number of elements for the text to appear in the GPME—if they do not, an error will appear, indicating a mismatch.


You should also be aware of the data type that is used in the ADMX file and how it matches with the parameter definition in the ADML file. The ADMX file uses the boolean data type, which matches the checkBox parameter definition in the ADML file. Table 4 shows how to match the data types from the ADMX file to the associated parameter definitions in the ADML file.

Table 4. ADMX Data Type to ADML Parameter Definition Matrix
ADMX File Data TypeADML File Parameter Definition
boolean ElementcheckBox Element
text ElementtextBox Element
decimal Element (elements)decimalTextBox Element
text ElementcomboBox Element
enum ElementdropdownList Element
item ElementdropdownList Element
list ElementlistBox Element
Other  
  •  Windows 7 : Custom Libraries and Saved Searches (part 2) - Using Saved Searches
  •  Windows 7 : Custom Libraries and Saved Searches (part 1) - Creating Custom Libraries
  •  Windows 7 : Visualization and Organization - How to Make the Windows Shell Work for You - The Organizational Advantage of Libraries
  •  Windows 7 : Visualization and Organization - How to Make the Windows Shell Work for You
  •  Windows 7 : Understanding Libraries (part 2) - Special Shell Folders...Now Just User Folders
  •  Windows 7 : Understanding Libraries (part 1) - Virtual Folders 101, Libraries and Windows 7
  •  Windows Server 2012 MMC Administration (part 11) - Designing custom taskpads for the MMC - Creating navigation tasks, Arranging, editing, and removing tasks
  •  Windows Server 2012 MMC Administration (part 10) - Designing custom taskpads for the MMC - Creating and managing tasks
  •  Windows Server 2012 MMC Administration (part 9) - Designing custom taskpads for the MMC - Creating and managing taskpads
  •  Windows Server 2012 MMC Administration (part 8) - Designing custom taskpads for the MMC - Getting started with taskpads, Understanding taskpad view styles
  •  
    video
     
    Video tutorials
    - How To Install Windows 8

    - How To Install Windows Server 2012

    - How To Install Windows Server 2012 On VirtualBox

    - How To Disable Windows 8 Metro UI

    - How To Install Windows Store Apps From Windows 8 Classic Desktop

    - How To Disable Windows Update in Windows 8

    - How To Disable Windows 8 Metro UI

    - How To Add Widgets To Windows 8 Lock Screen

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010
    programming4us programming4us
    programming4us
     
     
    programming4us