programming4us
programming4us
DESKTOP

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

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

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
  •  
    Top 10
    Free Mobile And Desktop Apps For Accessing Restricted Websites
    MASERATI QUATTROPORTE; DIESEL : Lure of Italian limos
    TOYOTA CAMRY 2; 2.5 : Camry now more comely
    KIA SORENTO 2.2CRDi : Fuel-sipping slugger
    How To Setup, Password Protect & Encrypt Wireless Internet Connection
    Emulate And Run iPad Apps On Windows, Mac OS X & Linux With iPadian
    Backup & Restore Game Progress From Any Game With SaveGameProgress
    Generate A Facebook Timeline Cover Using A Free App
    New App for Women ‘Remix’ Offers Fashion Advice & Style Tips
    SG50 Ferrari F12berlinetta : Prancing Horse for Lion City's 50th
    - Messages forwarded by Outlook rule go nowhere
    - Create and Deploy Windows 7 Image
    - How do I check to see if my exchange 2003 is an open relay? (not using a open relay tester tool online, but on the console)
    - Creating and using an unencrypted cookie in ASP.NET
    - Directories
    - Poor Performance on Sharepoint 2010 Server
    - SBS 2008 ~ The e-mail alias already exists...
    - Public to Private IP - DNS Changes
    - Send Email from Winform application
    - How to create a .mdb file from ms sql server database.......
    programming4us programming4us
    programming4us
     
     
    programming4us