DESKTOP

Windows Server 2008 and Windows Vista : Using .adm Template Language (part 3) - Syntax for Updating the GPME Interface - STRINGS , CATEGORY

12/4/2013 2:54:12 AM

4. Syntax for Updating the GPME Interface

The .adm templates do more than just indicate the registry path, value, and data that need to be updated. They also configure the interface of the GPME. The interface configurations are essential because the GPME interface is where the configurations are actually made.

Four main types of syntax create the interface within the Group Policy Management Editor:

  • STRINGS

  • CATEGORY

  • POLICY

  • PART

The CATEGORY and POLICY syntaxes are the only required entries in the .adm template, but the other two variables are important. The STRINGS syntax is used extensively in the standard .adm templates, but it is seldom used in custom .adm templates. The PART syntax is used when the registry value or values being referenced require more than an ON or OFF configuration.

4.1 STRINGS

The STRINGS syntax is used to help organize and logically format the string variables used within the .adm template. The STRINGS syntax is not mandatory, but it can help reduce the code within the main body of the .adm template to remove the clutter and make it easier to read. The STRINGS syntax allows for variables to be used for lengthy strings. Strings are used to create the interface within the GPME. The following example uses the STRINGS syntax whenever there is a string variable to create the interface.

CLASS MACHINE
CATEGORY !!CUSTOMADM
POLICY !!Autologon
KEYNAME "SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon"
PART !!Username
EDITTEXT
VALUENAME "autoadminlogon"
END PART
PART !!Password
EDITTEXT
VALUENAME "defaultpassword"
END PART
END POLICY
END CATEGORY
[STRINGS]
CUSTOMADM = "Microsoft Custom ADM Entries"
AutoLogon = "Automatic Logon"
Username = "What is the name of the user?"
Password = "What is the user's password?"

As you can see, the STRINGS syntax cleans up the main part of the .adm template. It also allows for easy administration of all of the string variables, because they are all located under the [STRINGS] section at the bottom of the .adm template. If a string variable is used more than once in the .adm template, you can just use the STRINGS syntax and the string variable name at each instance, which will point to the single instance of the actual string at the end of the .adm template. Within the main body of the .adm template, the strings are referenced by using the double exclamation point (!!) followed by the string variable name.

For smaller .adm templates, you might not need to use the STRINGS syntax. However, in larger .adm templates, the STRINGS syntax can help reduce the complexity of the main body of the .adm template. The STRINGS syntax is especially useful in conjunction with the EXPLAIN syntax. The EXPLAIN text is generally very lengthy and can clog up the main body of the .adm template. By using the STRINGS syntax within the main body of the .adm template, you can leave the longer strings to the STRINGS section at the bottom of the .adm template.

Tip

If you need to convert .adm templates to different languages, you should place all interface strings in the STRINGS section. You then need to convert only the STRINGS section to the different languages.


Note

The STRINGS syntax can be used with the CATEGORY, POLICY, PART, and EXPLAIN statements.


4.2 CATEGORY

The CATEGORY syntax produces the folders that you see in the GPME. Both the Computer Configuration and User Configuration sections in the GPME display these folders, so you use the CATEGORY syntax under both the CLASS MACHINE and CLASS USER entries. The CATEGORY syntax can be nested in a hierarchy, to generate subfolders. Each CATEGORY statement that you list produces a folder or subfolder in the GPME.

The following structure creates three folders in a hierarchy.

CATEGORY "First level"
CATEGORY "Second level"
CATEGORY "Third level"
END CATEGORY
END CATEGORY
END CATEGORY

If you want to display multiple policies under a single folder (CATEGORY statement), you can just list the policies after the CATEGORY syntax and before the END CATEGORY syntax.

Note

The CATEGORY syntax must be combined with an END CATEGORY statement. This is required so that the GPME knows where to stop nesting folders, as well as where to stop placing policies within the folder.

Additional syntax that you can use in conjunction with CATEGORY includes KEYNAME, CATEGORY, END, SUPPORTED, and POLICY.

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