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

  • 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