RegistryPolicy.DisableList Method (RegistryHive, String, String[])
Disables all registry-based policy settings that configure any registry values in a specified list.
Namespace: Microsoft.GroupPolicy
Assembly: Microsoft.GroupPolicy.Management (in Microsoft.GroupPolicy.Management.dll)
Syntax
public void DisableList(
RegistryHive hive,
string keyPath,
string[] valueNames
)
public:
void DisableList(
RegistryHive hive,
String^ keyPath,
array<String^>^ valueNames
)
member DisableList :
hive:RegistryHive *
keyPath:string *
valueNames:string[] -> unit
Public Sub DisableList (
hive As RegistryHive,
keyPath As String,
valueNames As String()
)
Parameters
hive
Type: Microsoft.Win32.RegistryHiveOne of the RegistryHive values that specifies the registry hive of the key. Specify CurrentUser to disable policy settings in User Configuration. Specify LocalMachine to disable policy settings in Computer Configuration. No other values are supported.
keyPath
Type: System.StringThe path to the registry key.
valueNames
Type: System.String[]An array of strings that contains the names of the registry values. You can specify an empty string (“”) for the default value.
Exceptions
Exception | Condition |
---|---|
ObjectDisposedException | The RegistryPolicy is disposed. |
InvalidOperationException | The RegistryPolicy instance is read-only. |
ArgumentNullException | keyPath is null or valueNames is null |
ArgumentException | keyPath is an empty string (“”) -or- valueNames array has no elements -or- hive is not CurrentUser or LocalMachine |
See Also
RegistryPolicy Class
Microsoft.GroupPolicy Namespace
Return to top