Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

RegistryAttributeDefinitionsType

System Center

Updated: August 10, 2011

Applies To: Operations Manager 2007 R2

RegistryAttributeDefinitionsType is a complex data type that is used to retrieve key/value pairs from the Windows registry.


<xsd:complexType name="RegistryAttributeDefinitionsType">
  <xsd:sequence>
    <xsd:element name="RegistryAttributeDefinition" minOccurs="1" maxOccurs="unbounded">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element name="AttributeName" type="xsd:ID" />
          <xsd:element name="Path" type="xsd:string" />
          <xsd:element name="PathType" type="xsd:integer" />
          <xsd:element name="AttributeType" type="xsd:integer" />
          <xsd:element name="RegistryView" minOccurs="0" maxOccurs="1" type="RegistryViewType" />
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
  </xsd:sequence>
</xsd:complexType>

The RegistryAttributeDefinitionsType data type specifies a collection of registry keys and values to collect. The RegistryAttributeDefinitionsType requires the sub-elements described in the following table.

 

Element Type Description

AttributeName

ID

An identifier for the value in the output data item. This must be unique within the RegistryAttributeDefinitionsType element and must consist only of letters, numbers, the underscore, hyphen, and period. Digits, the hyphen, and the period cannot be used to start the name.

Path

String

The path to collect in the registry under HKEY_LOCAL_MACHINE. This path can be a key or a value.

PathType

Integer

Specifies whether the path is a key or a value.

  • 0—Specifies that the path is to a key, for which the existence of the key should be checked.

  • 1—Specifies that the path is to a value that should be retrieved.

AttributeType

Integer

The data type of the value to return:

  • 0—Boolean

  • 1—String

  • 2—Integer

  • 3—Float

Values 1, 2, and 3 are used only when the PathType is set to 1.

RegistryView

RegistryViewType

Specifies the registry view type to access. If unspecified, defaults to a value of “default”.

The following code sample illustrates how an element that is of type RegistryAttributeDefinitionsType returns the existence of a registry key:

<RegistryAttributeDefinition>
  <AttributeName>ApplicationXExists</AttributeName>
  <Path>SOFTWARE\OpsMgrSamples\ApplicationX</Path>
  <PathType>0</PathType>
  <AttributeType>0</AttributeType>
</RegistryAttributeDefinition>

The following code example of type RegistryAttributeDefinitions returns a registry value:


  <RegistryAttributeDefinition>
    <AttributeName>ApplicationXVersion</AttributeName>
    <Path>SOFTWARE\OpsMgrSamples\ApplicationX\Version</Path>
    <PathType>1</PathType>
    <AttributeType>1</AttributeType>
  </RegistryAttributeDefinition>

 

   

Schema Type

Microsoft.Windows.RegistryAttributeDefinitionsSchema

Library

Microsoft.Windows.Library

 
Show:
© 2014 Microsoft. All rights reserved.