Specifies various options, including drop-down list boxes, text boxes, and text in the lower pane of the Group Policy Object Editor. A policy part is specified as follows. Brackets indicate optional parameters.
PART name part-type key name value name on value off value type-dependent data [KEYNAME ] VALUENAME END PART
Part name as it should appear in the Group Policy Object Editor.
Policy part type. This parameter can be one of the following values. See the following Remarks section for a list of the options each type accepts.
Type Description CHECKBOX Displays a check box. The value is set in the registry with the REG_DWORD type. The value is nonzero if the check box is checked and zero if it is not checked. COMBOBOX Displays a combo box. DROPDOWNLIST Displays a combo box with a drop-down list style. The user may choose only one of the entries supplied. EDITTEXT Displays a text box that accepts alphanumeric text. The text is set in the registry with either the REG_SZ or the REG_EXPAND_SZ type. LISTBOX Displays 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. NUMERIC Displays a text box with an optional spin control that accepts a numeric value. The value is set in the registry with the REG_DWORD type. TEXT Displays a line of static text. There is no associated registry value with this part type.
- type-dependent data
Type-dependent data. Possible values are discussed in the following Remarks section.
- key name
Optional path to the registry key to use for the category. Do not include HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER in the registry path. The preceding CLASS statement determines which of these keys are used.
- value name
Registry value that is modified. If the administrator selects the option, the value is a REG_DWORD set to 1. If the administrator clears the option, the registry value is removed. To specify values other than the default values, use the VALUEON and VALUEOFF statements directly following the corresponding VALUENAME statement. These statements are specified as follows:
VALUEON on value
VALUEOFF off value
The CHECKBOX part type accepts the following options.
|ACTIONLISTOFF||Specifies an optional action list to be used if the check box is cleared. For more information, see
Note The Group Policy Management Console (GPMC) requires that key name be defined before ACTIONLISTOFF is specified.
|ACTIONLISTON||Specifies an optional action list to be used if the check box is selected. For more information, see
Note The Group Policy Management Console (GPMC) requires that key name be defined before ACTIONLISTON is specified.
|DEFCHECKED||Causes the check box to be initially selected.|
|VALUEOFF||Overrides the default behavior of the check box if it is cleared. |
Note The Group Policy Management Console (GPMC) requires that key name and value name be defined before VALUEOFF is specified.
|VALUEON||Overrides the default behavior of the check box if it is selected.|
Note The Group Policy Management Console (GPMC) requires that key name and value name be defined before specifying VALUEON.
The default behavior of a check box is to write the value 1 to the registry if it is selected and zero if it is cleared. The VALUEON and VALUEOFF options override this behavior. For example, the following option writes "Turned on" to the registry when the check box is selected:
VALUEON "Turned on"
The following statement writes the value 12 to the registry when the check box is cleared:
VALUEOFF NUMERIC 12
The COMBOBOX part type accepts the same options as EDITTEXT, with the addition of the following option.
|SUGGESTIONS||A list of suggestions to be placed in the drop-down list. The list must end with END SUGGESTIONS. Suggestions are separated with spaces and can be enclosed within double quotation marks. A suggestion that includes white space must be delimited with quotation marks, as illustrated by "New York" in the following example: SUGGESTIONS Alaska Alabama Mississippi "New York" END SUGGESTIONS|
The DROPDOWNLIST part type accepts the following options.
|ITEMLIST||A list of the items in the drop-down list. For more information, see ITEMLIST.|
|REQUIRED||Specifies that the Group Policy Object Editor does not allow a policy that contains this part to be enabled unless a value has been provided for the part.|
The EDITTEXT part type accepts the following options.
|DEFAULT value||Specifies the initial string to place in the text box. If this option is not specified, the text box is initially empty.|
|MAXLEN value||Specifies the maximum length of a string. The string in the text box is limited to this length.|
|REQUIRED||Specifies that the Group Policy Object Editor does not allow a policy that contains this part to be enabled, unless a value has been provided for this part.|
|OEMCONVERT||Sets the ES_OEMCONVERT style in the text box so that typed text is mapped from ANSI to OEM and back to ANSI.|
|EXPANDABLETEXT||Specifies that the text is set in the registry with the REG_EXPAND_SZ type. By default, the text is set in the registry with the REG_SZ type.|
The LISTBOX part type accepts the following options.
|ADDITIVE||By default, the content of list boxes override the values set in the registry. 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.|
|EXPLICITVALUE||This option makes the user specify not only the value data, but the value name as well. The list box shows two columns for each item, one for the name and one for the data. This option cannot be used with the VALUEPREFIX option.|
|VALUEPREFIX prefix||The prefix specified is used to determine value names. If a prefix is specified, the prefix and an incremented integer are used instead of the default value naming scheme described previously. For example, a prefix of "SomeName" generates the value names "SomeName1", "SomeName2", and so on. The prefix can be empty (""), which causes the value names to be "1", "2", and so on.|
The VALUENAME option cannot be used with the LISTBOX part type, because there is no single value name associated with this type. By default, only one column appears in the list box, and for each entry a value is created whose name and value are the same.
The NUMERIC part type accepts the following options.
|DEFAULT value||Specifies the initial numeric value for the text box. If this option is not specified, the text box 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 policy editor does not allow a policy that contains this part to be enabled unless a value has been provided for this part.|
|SPIN value||Specifies increments to use for the spin control. SPIN 0 removes the spin control. SPIN 1 is the default.|
|TXTCONVERT||Writes values as REG_SZ strings ("1," "2," or "128") rather than as binary values.|
The TEXT part type accepts no type-specific data. This part type is used to display a descriptive message.