Language
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Writes a registry-based policy setting that configures a DWord registry value by using the specified 32-bit unsigned integer.
This API is not CLS-compliant.
Namespace: Microsoft.GroupPolicy
Assembly: Microsoft.GroupPolicy.Management (in Microsoft.GroupPolicy.Management.dll)
Syntax
[CLSCompliantAttribute(false)]
public void WriteDWordValue(
RegistryHive hive,
string keyPath,
string valueName,
uint value
)
public:
[CLSCompliantAttribute(false)]
void WriteDWordValue(
RegistryHive hive,
String^ keyPath,
String^ valueName,
unsigned int value
)
[<CLSCompliantAttribute(false)>]
member WriteDWordValue :
hive:RegistryHive *
keyPath:string *
valueName:string *
value:uint32 -> unit
<CLSCompliantAttribute(False)>
Public Sub WriteDWordValue (
hive As RegistryHive,
keyPath As String,
valueName As String,
value As UInteger
)
Parameters
hive
Type: Microsoft.Win32.RegistryHiveOne of the RegistryHive values that specifies the registry hive of the key. Specify CurrentUser to write policy settings to User Configuration. Specify LocalMachine to write policy settings to Computer Configuration. No other values are supported.
keyPath
Type: System.StringThe path to the registry key.
valueName
Type: System.StringThe name of the registry value. You can specify an empty string (“”) for the default value.
value
Type: System.UInt32A 32-bit unsigned integer that contains the value data.
Exceptions
| Exception | Condition |
|---|---|
| ObjectDisposedException | The RegistryPolicy is disposed. |
| InvalidOperationException | The RegistryPolicy instance is read-only. |
| ArgumentNullException | keyPath is null |
| ArgumentException | keyPath is an empty string (“”) -or- hive is not CurrentUser or LocalMachine |
See Also
WriteDWordValue Overload
RegistryPolicy Class
Microsoft.GroupPolicy Namespace
Return to top