RegistryAttributeDefinitionsType
Applies To: System Center 2012 - Operations Manager, System Center 2012 R2 Operations Manager, System Center 2012 SP1 - Operations Manager
RegistryAttributeDefinitionsType is a complex data type that is used to retrieve key/value pairs from the Windows registry.
Schema Definition
<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>
Remarks
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.
|
AttributeType |
Integer |
The data type of the value to return:
Values 1, 2, and 3 are used only when the PathType is set to 1. |
RegistryView |
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>
Information
Schema Type |
Microsoft.Windows.RegistryAttributeDefinitionsSchema |
Library |
Microsoft.Windows.Library |