MSFT_MTRegistryKey class

Represent a registry key.

The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties.

Syntax

[UMLPackagePath("CIM::Core::CoreElements"), dynamic, provider("regprov"), AMENDMENT]
class MSFT_MTRegistryKey : MSFT_MTRegistryObject
{
  string   InstanceID;
  string   Caption;
  string   Description;
  string   ElementName;
  string   Name;
  uint32   SubKeyCount;
  uint32   ValueCount;
  datetime Modified;
};

Members

The MSFT_MTRegistryKey class has these types of members:

Methods

The MSFT_MTRegistryKey class has these methods.

Method Description
GetKey Gets the registry key object.
GetSubKeys Get child registry keys.
GetValues Get child registry keys.
Rename Renames the registry object.

Properties

The MSFT_MTRegistryKey class has these properties.

Caption

Data type: string

Access type: Read-only

Qualifiers: MaxLen (64)

The Caption property is a short textual description (one- line string) of the object.

This property is inherited from CIM_ManagedElement.

Description

Data type: string

Access type: Read-only

The Description property provides a textual description of the object.

This property is inherited from CIM_ManagedElement.

ElementName

Data type: string

Access type: Read-only

A user-friendly name for the object. This property enables each instance to define a display name in addition to its key properties, identity data, and description information. Be aware that the Name property of CIM_ManagedSystemElement is also defined as a display name. However, it is often subclassed to be a Key. The same property can convey both identity and a user-friendly name, without inconsistencies. Where Name exists and is not a Key (such as for instances of CIM_LogicalDevice), the same information can be present in both the Name and ElementName properties.

This property is inherited from CIM_ManagedElement.

InstanceID

Data type: string

Access type: Read-only

Within the scope of the instantiating Namespace, InstanceId opaquely and uniquely identifies an instance of this class. To ensure uniqueness within the NameSpace, the value of InstanceId should be constructed using the following "preferred" algorithm: OrgID:LocalID Where OrgID and LocalID are separated by a colon (:), and where OrgID must include a copyrighted, trademarked, or otherwise unique name that is owned by the business entity that is creating or defining the InstanceId or that is a registered ID assigned to the business entity by a recognized global authority. (This requirement is similar to the SchemaName_ClassName structure of Schema class names.) In addition, to ensure uniqueness, OrgID must not contain a colon (:). When using this algorithm, the first colon to appear in InstanceId must appear between OrgID and LocalID. LocalID is chosen by the business entity and should not be reused to identify different underlying (real-world) elements. If the above preferred algorithm is not used, the defining entity must assure that the resulting InstanceId is not reused across any InstanceIds produced by this or other providers for the NameSpace of this instance. For DMTF-defined instances, the "preferred" algorithm must be used with the OrgID set to CIM.

This property is inherited from CIM_ManagedElement.

Modified

Data type: datetime

Access type: Read-only

The timestamp at which this key was last modified.

Name

Data type: string

Access type: Read-only

Qualifiers: key

The unique name of the registry object.

This property is inherited from MSFT_MTRegistryObject.

SubKeyCount

Data type: uint32

Access type: Read-only

The number of sub keys under this key.

ValueCount

Data type: uint32

Access type: Read-only

The number of sub values under this key.

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2016
Namespace
Root\Microsoft\Windows\ManagementTools
MOF
RegProv.mof
DLL
RegProv.dll