API Reference
Interface
IPolicySource
Represents a source of policy settings.
Remarks
Modifying registry-based policy data requires the SeBackupPrivilege and SeRestorePrivilege privileges.
Methods
public abstract Void ClearKey(String key) #Returns:
VoidClears all values in a key.
Parameters
- key System.String
- Registry key path.
public abstract Boolean ContainsValue(String key, String value) #Returns:
BooleanDetermines whether the specified value exists.
Parameters
- key System.String
- Registry key path.
- value System.String
- Registry value name.
Returns
true when the value is present.
public abstract Void DeleteValue(String key, String value) #Returns:
VoidMarks a value for deletion.
Parameters
- key System.String
- Registry key path.
- value System.String
- Registry value name.
public abstract Void ForgetKeyClearance(String key) #Returns:
VoidStops tracking key clearance.
Parameters
- key System.String
- Registry key path.
public abstract Void ForgetValue(String key, String value) #Returns:
VoidStops tracking the specified value.
Parameters
- key System.String
- Registry key path.
- value System.String
- Registry value name.
public abstract IReadOnlyList<String> GetSubKeyNames(String key) #Returns:
IReadOnlyList<String>Gets subkey names under the specified key.
Parameters
- key System.String
- Registry key path.
Returns
List of immediate subkey names.
public abstract Object GetValue(String key, String value) #Returns:
ObjectGets the value data.
Parameters
- key System.String
- Registry key path.
- value System.String
- Registry value name.
Returns
Value data or null.
public abstract IReadOnlyList<String> GetValueNames(String key) #Returns:
IReadOnlyList<String>Gets value names defined in the key.
Parameters
- key System.String
- Registry key path.
Returns
List of value names.
public abstract Void SetValue(String key, String value, Object data, RegistryValueKind dataType) #Returns:
VoidSets a registry value.
Parameters
- key System.String
- Registry key path.
- value System.String
- Registry value name.
- data System.Object
- Value data.
- dataType Microsoft.Win32.RegistryValueKind
- Registry value type.
public abstract Boolean WillDeleteValue(String key, String value) #Returns:
BooleanChecks if the value will be deleted.
Parameters
- key System.String
- Registry key path.
- value System.String
- Registry value name.
Returns
true when the value is scheduled for deletion.