PART

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

name

Part name as it should appear in the Group Policy Object Editor.

part-type

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.

TypeDescription
CHECKBOXDisplays 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.
COMBOBOXDisplays a combo box.
DROPDOWNLISTDisplays a combo box with a drop-down list style. The user may choose only one of the entries supplied.

Note  The Group Policy Management Console (GPMC) requires that key name and value name be defined before specifying DROPDOWNLIST.

EDITTEXTDisplays 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.
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 control that accepts a numeric value. The value is set in the registry with the REG_DWORD type.
TEXTDisplays 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

Remarks

The following tables describe the CHECKBOX, COMBOBOX, DROPDOWNLIST, EDITTEXT, LISTBOX, NUMERIC and TEXT policy part types.

CHECKBOX Part Type

The CHECKBOX part type accepts the following options.

OptionDescription
ACTIONLISTOFFSpecifies an optional action list to be used if the check box is cleared. For more information, see ACTIONLIST.

Note  The Group Policy Management Console (GPMC) requires that key name be defined before ACTIONLISTOFF is specified.

ACTIONLISTONSpecifies an optional action list to be used if the check box is selected. For more information, see ACTIONLIST.

Note  The Group Policy Management Console (GPMC) requires that key name be defined before ACTIONLISTON is specified.

DEFCHECKEDCauses the check box to be initially selected.
VALUEOFFOverrides 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.

VALUEONOverrides 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

COMBOBOX Part Type

The COMBOBOX part type accepts the same options as EDITTEXT, with the addition of the following option.

OptionDescription
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

 

DROPDOWNLIST Part Type

The DROPDOWNLIST part type accepts the following options.

OptionDescription
ITEMLISTA list of the items in the drop-down list. For more information, see ITEMLIST.
REQUIREDSpecifies 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.

 

EDITTEXT Part Type

The EDITTEXT part type accepts the following options.

OptionDescription
DEFAULT valueSpecifies the initial string to place in the text box. If this option is not specified, the text box is initially empty.
MAXLEN valueSpecifies the maximum length of a string. The string in the text box is limited to this length.
REQUIREDSpecifies 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.
OEMCONVERTSets the ES_OEMCONVERT style in the text box so that typed text is mapped from ANSI to OEM and back to ANSI.
EXPANDABLETEXTSpecifies 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.

 

LISTBOX Part Type

The LISTBOX part type accepts the following options.

OptionDescription
ADDITIVEBy 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.
EXPLICITVALUEThis 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 prefixThe 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.

NUMERIC Part Type

The NUMERIC part type accepts the following options.

OptionDescription
DEFAULT valueSpecifies the initial numeric value for the text box. If this option is not specified, the text box is initially empty.
MAX valueSpecifies the maximum value for the number. The default value is 9999.
MIN valueSpecifies the minimum value for the number. The default value is 0.
REQUIREDSpecifies 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 valueSpecifies increments to use for the spin control. SPIN 0 removes the spin control. SPIN 1 is the default.
TXTCONVERTWrites values as REG_SZ strings ("1," "2," or "128") rather than as binary values.

 

TEXT Part Type

The TEXT part type accepts no type-specific data. This part type is used to display a descriptive message.

Related topics

Group Policy Overview
Group Policy File Formats

 

 

Show:
© 2014 Microsoft