RegistryPolicy.WriteBinaryValue Method (RegistryHive, String, String, Byte[])

 

Writes a registry-based policy setting that configures a Binary registry value.

Namespace:   Microsoft.GroupPolicy
Assembly:  Microsoft.GroupPolicy.Management (in Microsoft.GroupPolicy.Management.dll)

Syntax

public void WriteBinaryValue(
    RegistryHive hive,
    string keyPath,
    string valueName,
    byte[] value
)
public:
void WriteBinaryValue(
    RegistryHive hive,
    String^ keyPath,
    String^ valueName,
    array<unsigned char>^ value
)
member WriteBinaryValue : 
        hive:RegistryHive *
        keyPath:string *
        valueName:string *
        value:byte[] -> unit
Public Sub WriteBinaryValue (
    hive As RegistryHive,
    keyPath As String,
    valueName As String,
    value As Byte()
)

Parameters

  • valueName
    Type: System.String

    The name of the registry value. You can specify an empty string (“”) for the default value.

  • value
    Type: System.Byte[]

    An array of 8-bit unsigned integers that contains the value data.

Exceptions

Exception Condition
ObjectDisposedException

The RegistryPolicy is disposed.

InvalidOperationException

The RegistryPolicy instance is read-only.

ArgumentNullException

keyPath is null

-or-

value is null

ArgumentException

keyPath is an empty string (“”)

-or-

hive is not CurrentUser or LocalMachine

See Also

RegistryPolicy Class
Microsoft.GroupPolicy Namespace

Return to top