DESKTOP

Windows Server 2008 and Windows Vista : Using .adm Template Language (part 5)

12/4/2013 2:56:32 AM

4.4 PART

Use the PART syntax to specify options such as drop-down lists, text boxes, and text in the lower pane of a policy in the GPME. The previous example shows the PART syntax used in the .adm template and the resulting GPME interface from Figure 2.

You can also use the PART syntax to create an introduction or information about the policy in the lower pane of the policy. This PART syntax would simply introduce a clarifying sentence, without associating it with a registry value.

PART "Do you want to see Super Hidden files?" TEXT
END PART

Associating a PART within a “policy” to a registry value would look like this:

PART "Super Hidden" DROPDOWNLIST
VALUENAME Showsuperhidden
ITEMLIST
NAME "Yes" VALUE Numeric 1
NAME "No" VALUE Numeric 0
END ITEMLIST
END PART

The PART syntax can handle the various types of registry values that you include in your custom .adm templates. Each type of registry value requires the use of additional syntax to handle the input for the registry value. The previous example uses ITEMLIST, but other syntax options are available that you will need to use.

Note

The PART syntax requires an END PART to tell the GPME when to stop the configuration of the registry value within the interface. Additional syntax that you can use in conjunction with PART includes CHECKBOX, CLIENTTEXT, COMBOBOX, DROPDOWNLIST, EDITTEXT, LISTBOX, NUMERIC, END, PART, and TEXT.


To create the environment that allows the user to modify the registry values, you must include additional syntax after the PART syntax. Table 1 lists the valid syntax options that are used in conjunction with the PART syntax.

Table 1. Syntax Options for the PART Syntax
TypeDescription
CHECKBOXDisplays a check box. The value is set in the registry with the REG_DWORD type. The value is other than zero if the check box is selected and zero if it is not selected.
CLIENTTEXTSpecifies which client-side extension to use for the specific policy setting.
COMBOBOXDisplays a combo box.
DROPDOWNLISTDisplays a combo box with a drop-down list style. The user can choose only one of the entries supplied.
EDITTEXTDisplays a text box that accepts alphanumeric text. The text is set in the registry with the REG_SZ or the REG_EXPAND_SZ type.
LISTBOXDisplays a list box with Add and Remove buttons. This is the only PART type that can be used to manage multiple values under one key.
NUMERICDisplays a text box with an optional spin box control that accepts a numeric value. The value is set in the registry with the REG_DWORD type.
TEXTDisplays a line of static text. No registry value is associated with this PART type.

4.4.1 CHECKBOX

When you are combining multiple registry values under one policy, you use the CHECKBOX syntax to function like the VALUEON/VALUEOFF syntax. If the check box is selected (VALUEON), the registry value associated with the CHECKBOX syntax has a value of 1 written to the registry. A value of 0 is written to the registry if the check box is not selected (VALUEOFF).

You can also combine the CHECKBOX syntax with the VALUEON/VALUEOFF syntax to clearly specify what the registry values should be when the check box is selected and not selected. Here is a snippet of the System.adm template, which uses the CHECKBOX syntax:

PART !!StdCheckT CHECKBOX
VALUENAME "DisableRollback"
VALUEON NUMERIC 1
VALUEOFF NUMERIC 0
END PART

Note

Additional syntax that you can use in conjunction with CHECKBOX includes KEYNAME, VALUENAME, ACTIONLISTON, ACTIONLISTOFF, VALUEON, VALUEOFF, DEFCHECKED, CLIENTTEXT, and END.


4.4.2 CLIENTTEXT

The CLIENTTEXT keyword is used to specify which client-side extension (CSE) to the GPME needs to process the particular settings on the client computer. By default, the registry extension processes all settings configured under the Administrative Templates node. The CLIENTTEXT keyword changes the default behavior and causes the specified extension to process these settings after the registry extension has placed them in the registry.

The CLIENTTEXT syntax is the keyword followed by the GUID, representing the CSE. This implies that the registry key and value information will be stored in the registry.pol file when the policy setting is configured to either an enabled state or a disabled state. Instead of the registry CSE acting on this registry information, a different CSE represented by the GUID value will be called to process the registry information during Group Policy processing on the client computer. For example, the disk quota CSE uses the GUID value of {3610eda5-77ef-11d2-8dc5-00c04fa31a66} in the following example. GUID values are used to represent CSEs to employ a unique designation for each CSE.

The CLIENTTEXT syntax must be used within the POLICY scope or the PART scope and should follow the VALUENAME statement.

CLIENTTEXT alters the default behavior of typical GPOs. Typical GPOs process all settings under the Administrative Templates node. The CLIENTTEXT syntax specifies the specific extension to process a GPO setting, after it has been placed in the registry.

The following is an example from the System.adm template. It configures the disk quotas within the GPO. As you can see, Disk Quotas has a separate CSE, which is referenced within the example code:

POLICY !!DQ_Enforce
KEYNAME "Software\Policies\Microsoft\Windows NT\DiskQuota"
VALUENAME "Enforce"
VALUEON NUMERIC 1
VALUEOFF NUMERIC 0
CLIENTEXT {3610eda5-77ef-11d2-8dc5-00c04fa31a66}
END POLICY

Note

The CLIENTTEXT syntax shown in this example assumes that a corresponding CSE has been written and is resident on each client machine that needs to process this registry information.

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
  •  
    Most View
    Spring Is Here (Part 2)
    Is 802.11ac Worth Adopting?
    BlackBerry Z10 - A Touchscreen-Based Smartphone (Part 1)
    LG Intuition Review - Skirts The Line Between Smartphone And Tablet (Part 5)
    Fujifilm X-E1 - A Retro Camera That Inspires (Part 4)
    My SQL : Replication for High Availability - Procedures (part 6) - Slave Promotion - A revised method for promoting a slave
    10 Contenders For The 'Ultimate Protector' Crown (Part 3) : Eset Smart Security 6, Kaspersky Internet Security 2013, Zonealarm Internet Security 2013
    HTC Desire C - Does It Have Anything Good?
    Windows Phone 7 : Understanding Matrix Transformations (part 2) - Applying Multiple Transformations
    How To Lock Windows By Image Password
    REVIEW
    - First look: Apple Watch

    - 10 Amazing Tools You Should Be Using with Dropbox
    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
    Top 10
    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?
    Java Tutorials : Nested For Loop (part 2) - Program to create a Two-Dimensional Array
    Java Tutorials : Nested For Loop (part 1)
    C# Tutorial: Reading and Writing XML Files (part 2) - Reading XML Files
    C# Tutorial: Reading and Writing XML Files (part 1) - Writing XML Files