DESKTOP

Windows Server 2008 and Windows Vista : Using .adm Template Language (part 1) - Structure of an .adm Template

12/4/2013 2:49:07 AM

1. Structure of an .adm Template

An .adm template has two functions. The first function is to create the interface within the GPME for the registry values that you want configured on users or machines targeted by a GPO. This formatting is the same for all .adm templates, so you can use existing .adm templates as a guide. The second function of the .adm template is to format the registry path, value, and data that will be updated in the target computer’s registry. Again, this syntax is the same for all .adm templates and is easy to follow.

Note

Although the syntax is easy to follow for the registry path in the .adm template, the path must be accurate to avoid potential corruption of the registry on the target computer.


Look at the following .adm template example. It allows the computer to log on without any user input by using a predetermined username and password.

CLASS MACHINE
CATEGORY "Microsoft Custom ADM Entries"
POLICY "Automatic Logon"
KEYNAME "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
PART "Enable Auto Logon? (1=Yes, 0=No)" NUMERIC REQUIRED TXTCONVERT
VALUENAME "AutoAdminLogon"
MIN 0 MAX 1 DEFAULT "0" SPIN 1
END PART
PART "What is the name of the user?" EDITTEXT
VALUENAME "defaultusername"
END PART
PART "What is the user's password?" EDITTEXT
VALUENAME "defaultpassword"
END PART
END POLICY
END CATEGORY

You can see that the structure of the .adm template is very methodical. If you look closely at the example, you can see that some rules must be followed. One such rule is the inclusion of an END syntax for PART, POLICY, and CATEGORY entries.

Review the structure of the example to evaluate the components that you need to fully understand:

  • CLASS MACHINE Specifies that the registry HKEY that we are modifying is under HKEY_LOCAL_MACHINE.

  • CATEGORY Specifies the name that will be given to the folder that will appear in the GPME. In our example, it is Microsoft Custom ADM Entries.

  • POLICY Specifies the name we are giving to the policy that will appear in the GPME. In our example, it is Automatic Logon.

  • KEYNAME Specifies the path in the registry where the value that will be modified exists. Notice that KEYNAME does not include the HKEY name or the name of the value.

  • PART Specifies to the GPME that input will be required from the GPO administrator.

  • EDITTEXT Specifies that a text box will be presented to allow the administrator to type text for the data of the registry value.

  • VALUENAME Specifies the exact registry value that is being modified. Notice that VALUENAME is not the specified data for the registry value (the string or setting associated with the registry value); rather, it is the name of the registry value. The data for the registry value will be input through the GPME.

  • END PART Indicates to the GPME that the syntax related to this PART is done.

  • END POLICY Indicates to the GPME that the syntax related to this POLICY is done.

  • END CATEGORY Indicates to the GPME that the syntax related to this CATEGORY is done.

If you were to create a shell depicting a standard .adm template structure, it would look something like this.

CLASS (GPME and Registry)
CATEGORY (GPME)
KEYNAME (Registry)
POLICY (GPME)
PART (GPME)
VALUENAME (Registry)

To create your own .adm templates, you must build on this structure and understand all of the syntax that can be placed in the .adm templates. We will do this by breaking down the syntax into two categories: the interface for the GPME and the registry path and value inputs.

Other  
  •  Windows Server 2008 and Windows Vista : Creating Custom .adm Templates - A Simple .adm Template
  •  Windows Server 2003 : Implementing Software Restriction Policies (part 5) - Optional Tasks for Implementing Software Restriction Policies
  •  Windows Server 2003 : Implementing Software Restriction Policies (part 4) - Implementing Software Restriction Policies - Creating a Path Rule, Designating File Types
  •  Windows Server 2003 : Implementing Software Restriction Policies (part 3) - Implementing Software Restriction Policies - Creating a Certificate Rule, Creating an Internet Zone Rule
  •  Windows Server 2003 : Implementing Software Restriction Policies (part 2) - Implementing Software Restriction Policies - Creating a Hash Rule
  •  Windows Server 2003 : Implementing Software Restriction Policies (part 1)
  •  Windows Server 2003 : Troubleshooting Software Deployed with Group Policy - Software Deployment Troubleshooting Scenarios
  •  Windows Server 2003 : Maintaining Software Deployed with Group Policy (part 2) - Removing Applications Deployed with Group Policy
  •  Windows Server 2003 : Maintaining Software Deployed with Group Policy (part 1) - Upgrading Applications Deployed with Group Policy
  •  Windows 7 : Using WDS for Multicast Deployments (part 2) - Creating a Multicast Deployment
  •  
    Top 10
    Extending LINQ to Objects : Writing a Single Element Operator (part 2) - Building the RandomElement Operator
    Extending LINQ to Objects : Writing a Single Element Operator (part 1) - Building Our Own Last Operator
    3 Tips for Maintaining Your Cell Phone Battery (part 2) - Discharge Smart, Use Smart
    3 Tips for Maintaining Your Cell Phone Battery (part 1) - Charge Smart
    OPEL MERIVA : Making a grand entrance
    FORD MONDEO 2.0 ECOBOOST : Modern Mondeo
    BMW 650i COUPE : Sexy retooling of BMW's 6-series
    BMW 120d; M135i - Finely tuned
    PHP Tutorials : Storing Images in MySQL with PHP (part 2) - Creating the HTML, Inserting the Image into MySQL
    PHP Tutorials : Storing Images in MySQL with PHP (part 1) - Why store binary files in MySQL using PHP?
    REVIEW
    - First look: Apple Watch

    - 3 Tips for Maintaining Your Cell Phone Battery (part 1)

    - 3 Tips for Maintaining Your Cell Phone Battery (part 2)
    VIDEO TUTORIAL
    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 1)

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 2)

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 3)
    Popular Tags
    Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS