Partager via


item Element (enum)

Applies To: Windows Server 2008

The item element is a child element of the enum element representing a display name associated with one single value or a single value with a set of registry subkey values.

Syntax

     <item    displayName="$(string.<placeholder for text>)">
       <item> … </item>
     </item>

Attributes

Attributes Required Description

displayName Attribute

Yes

displayName="$( string.<placeholder for name>)"

The reference to a display string located in the .adml file string table.

Child elements

Element Required Description

value Element

Yes

Represents a registry entry value.

valueList Element

No

A list of items with an associated registry key and 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 key attribute defined in the enum element or policy element will be used to define the default registry key location for all value elements and valueList elements.

Examples

This XML fragment demonstrates the use of the item element, child element of the enum element, to configure a single choice for an enum. This could represent one choice from a drop-down list in the parameter of a policy setting.

          <item displayName="$(string.displayChoice1)">
            <value>
              <decimal value="1" />
            </value>
            <valueList>
              <item key="Software\Policies\Examples\1" valueName="1">
                <value>
                  <decimal value="3" />
                </value>
              </item>
              <item key="Software\Policies\Examples\2" valueName="2">
                <value>
                  <decimal value="3" />
                </value>
              </item>
            </valueList>
          </item>

Additional references

enum Element