次の方法で共有


Defining the RSoP Schema

Each client-side extension must define the schema for its RSoP data by subclassing from the RSOP_PolicySetting class and adding properties that are relevant to the extension. The schema must be included in a managed object format (MOF) file and compiled into a WMI namespace during the setup of the extension.

Be aware that a client-side extension should not create an association to instances of classes that the extension does not define. The lifetime of the instances is outside the control of the client-side extension.

To view the RSoP schema, use a CIMOM schema browser and target the \\.\root\rsop namespace. The following is an example of the schema for registry extension.

Note

Classes that derive from the RSOP_PolicySetting class must redefine both the id and the precedence properties to be keys.

 

//
// RSOP_RegistryPolicySetting
// Comment: Abstraction for registry extension policy data
//
[
Description("Policy object for registry or for Administrative Templates extension."
                "Policy settings in an .adm file involve setting values on registry"
                "keys that are abstracted by this class.")
]
class RSOP_RegistryPolicySetting : RSOP_PolicySetting
{
[key, Description("Inherited from RSOP_PolicySetting"), Read, DisplayName("ID")]
string id;

[key, Description("Inherited from RSOP_PolicySetting"), Read, DisplayName("Precedence")]
uint32 precedence;

[Description("Name of the registry key,"), Read, DisplayName("Registry Key")]
string registryKey = "";

[Description("Name of registry value"), Read, DisplayName("Value Name")]
string valueName = "";

[Description("Data type of value, which corresponds to registry "
             "value types such as REG_SZ."), Read, DisplayName("Type")]
uint32 valueType = 0;

[Description("Value represented by an array of bytes"), Read, DisplayName("Value")]
uint8  value[];

[Description("Indicates whether the registry key, or registry value "
             "has been deleted."), Read, DisplayName("Is Deleted")]
boolean deleted = false;

[Description("Command being run on the key, or value."), Read, DisplayName("Command")]
string command = "";
};

Note

You can use the same schema to log RSoP data in both logging mode and planning mode. For more information, see Supporting RSoP Logging Mode and Supporting RSoP Planning Mode.