RegistryPreference.WriteKey Method (RegistryHive, String, PreferenceAction, Int32, Boolean)
Writes a Registry preference item that configures a registry key.
Namespace: Microsoft.GroupPolicy
Assembly: Microsoft.GroupPolicy.Management (in Microsoft.GroupPolicy.Management.dll)
Syntax
public void WriteKey(
RegistryHive hive,
string keyPath,
PreferenceAction action,
int order,
bool disable
)
public:
void WriteKey(
RegistryHive hive,
String^ keyPath,
PreferenceAction action,
int order,
bool disable
)
member WriteKey :
hive:RegistryHive *
keyPath:string *
action:PreferenceAction *
order:int *
disable:bool -> unit
Public Sub WriteKey (
hive As RegistryHive,
keyPath As String,
action As PreferenceAction,
order As Integer,
disable As Boolean
)
Parameters
hive
Type: Microsoft.Win32.RegistryHiveOne of theRegistryHive values that specifies the registry hive of the key.
keyPath
Type: System.StringThe path to the registry key.
action
Type: Microsoft.GroupPolicy.PreferenceActionOne of the PreferenceAction values that specifies the action.
order
Type: System.Int32The order for the Registry preference item.
disable
Type: System.Booleantrue to disable the Registry preference item; otherwise, false.
See Also
RegistryPreference Class
Microsoft.GroupPolicy Namespace
Return to top