Partager via


valueList Element

Applies To: Windows Server 2008

The valueList element is used to set the multiple registry values within the item element when defined as a child of the enum element.

Syntax

     <valueList defaultKey="<placeholder for registry subkey>">
       <item> … </item>
     </valueList>

Attributes

Attributes Required Description

defaultKey Attribute

No

Represents a default registry subkey for all items.

Child elements

Element Required Description

item Element

Yes

Represents a registry subkey with an associated value.

Note

For simplicity of documentation, nested elements located one level down, known as child elements, will only be described for a given element.

Remarks

The valueList element is an optional element. If you use the valueList element nested within an enum element, you must define at least one item element. If not, the Group Policy Management Console or the Local Group Policy Editor will display an error.

There is no limit to the number of items that can be defined for a single valueList element.

The valueList element is most commonly used to set multiple registry key values for a drop-down list choice of a policy setting parameter.

Note

This topic refers to two separate item elements, each defined differently. They are distinguished from each other based on the relative level within the enum element definition.
One item element is the parent to the valueList element. This item element represents the display and registry keys and values that will be configured for a single choice (for example, in a drop-down list).
The second item element is the child element of the valueList element. This item element represents a single registry subkey with its associated value.

Examples

This XML fragment is an example of three registry values set to either a string or decimal value when a policy setting is configured to the enabled state.

      <enabledList>
        <item key="Software\Policies\Examples"
              valueName="Example2ActionList1">
          <value>
            <string>1</string>
          </value>
        </item>
        <item key="Software\Policies\Examples"
              valueName="Example2ActionList2">
          <value>
            <decimal value="11" />
          </value>
        </item>
        <item key="Software\Policies\Examples"
              valueName="Example2ActionList3">
          <value>
            <string>String3</string>
          </value>
        </item>
      </enabledList>

Additional references

item Element (enum)