programming4us
programming4us
DESKTOP

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

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

The LISTBOX PART component specifies various options such as drop-down list boxes, text boxes, and text in the lower pane of the GPME. The LISTBOX is a simple syntax, as you can see from this snippet from the System.adm template:

PART !!RestrictAppsList LISTBOX
KEYNAME "Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\RestrictRun"
VALUEPREFIX ""
END PART


The resulting GPME interface is shown in Figure 5.

Figure 5. The LISTBOX syntax provides an interface in which multiple values can be entered for a single registry value.


In addition to the standard LISTBOX syntax, you can also add more options to the administrative template, including the following:

  • ADDITIVE By default, the content of list boxes overrides any values set in the target registry. This means that a control value is inserted in the policy file that causes existing values to be deleted before the values set in the policy file are merged. If this option is specified, existing values are not deleted and the values set in the list box are in addition to whatever values exist in the target registry. If a GPO that uses this syntax is disabled, the disabled settings are not applied and are thus removed from the registry.

    Caution

    The ability to disable a GPO using the LISTBOX ADDITIVE syntax was introduced with Windows XP Professional SP2. If you attempt to administer a GPO that uses the new LISTBOX ADDITIVE syntax on a computer that does not run Windows XP Professional SP2 or Windows Server 2003 SP1, you will receive an error: “The following entry in the [strings] section is too long and has been truncated.” To obtain hotfixes to correct this problem on different platforms, see article 842933 in the Microsoft Knowledge Base at http://support.microsoft.com/kb/842933.


  • EXPLICITVALUE This option requires the user to specify the value data and the value name. The list box shows two columns, one for the name and one for the data. This option cannot be used with the VALUEPREFIX option.

  • VALUEPREFIX prefix The prefix you specify is used in determining value names. If you specify a prefix, the prefix and an incremented integer are used instead of the default value naming scheme described previously. For example, a prefix of SampleName generates the value names SampleName1, SampleName2, and so on. The prefix can be empty (“”), which causes the value names to be 1, 2, and so on.

Note

Additional syntax that you can use in conjunction with LISTBOX includes KEYNAME, VALUEPREFIX, END, ADDITIVE, EXPLICITVALUE, EXPANDABLETEXT, NOSORT, and CLIENTEXT.


4.4.7 NUMERIC

Displays an edit field with an optional spin box control (an up-down control) that accepts a numeric value. It is best to use the MIN and MAX syntax in conjunction with the NUMERIC syntax to ensure that the registry does not become corrupted with invalid data. The following is a snippet from the System.adm template using the NUMERIC syntax:

PART !!ProfileSize
NUMERIC REQUIRED SPIN 100
VALUENAME "MaxProfileSize"
DEFAULT 30000
MAX 30000
MIN 300
END PART

The SPIN syntax allows for a spin box control to set the range of values that can be set. This adds to the MIN and MAX controls to provide a boundary for the data of the registry value. Other syntax that you can use along with the NUMERIC syntax includes:

  • DEFAULT value Specifies the initial numeric value for the edit field. If this option is not specified, the field is initially empty.

  • MAX value Specifies the maximum value for the number. The default value is 9999.

  • MIN value Specifies the minimum value for the number. The default value is 0.

  • REQUIRED Specifies that the GPME does not allow a policy containing this PART to be enabled unless a value has been entered for this PART.

  • SPIN value Specifies increments to use for the spin box control. The default is SPIN 1.

  • SPIN 0 Removes the SPIN control from the “policy” settings.

  • TXTCONVERT Writes values as REG_SZ strings (“1”, “2”, or “128”) rather than as binary values.

Note

Additional syntax that you can use in conjunction with NUMERIC includes KEYNAME, VALUENAME, END, MIN, MAX, SPIN, TXTCONVERT, REQUIRED, DEFAULT, and CLIENTEXT.


4.4.8 TEXT

The TEXT syntax can be used to display text on the property page of a policy setting. The following is a snippet from the System.adm template that uses the TEXT syntax:

PART !!GPRefreshRate_C_Desc1 TEXT
END PART
PART !!GPRefreshRate_C_Desc2 TEXT
END PART

This creates two lines of static text in the dialog box when you edit the policy setting.

4.5 ACTIONLIST

You can use the ACTIONLIST syntax to specify a set of arbitrary registry changes to make in response to a control being set to a particular state. Here is a snippet of code for the ACTIONLIST syntax:

POLICY "Deny connections requests"
EXPLAIN "If enabled, TS will stop accepting connections"
ACTIONLISTON
VALUENAME "fDenyTSConnections" VALUE NUMERIC 1
END ACTIONLISTON
ACTIONLISTOFF
VALUENAME "fDenyTSConnections" VALUE NUMERIC 0
END ACTIONLISTOFF
END POLICY

ACTIONLIST has two variants that you can use with the POLICY and CHECKBOX syntax. Table 2 describes these variants.

Table 2. CHECKBOX Syntax Variants
VariantDescription
ACTIONLISTONSpecifies an optional action list to be used if the check box is selected.
ACTIONLISTOFFSpecifies an optional action list to be used if the check box is not selected.
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