Nucleus handler tools › Docs › Context › EditRegKey
Context.EditRegKey
Open in the workbench (search, and try it in a handler)
Context.EditRegKey(
baseKey: string | number | boolean,
sKey: string | number | boolean,
subKey: string | number | boolean,
value: any,
regType: Nucleus.RegType | number | boolean
): void
Edit a registry key for current user, baseKey can either be "HKEY_LOCAL_MACHINE" or "HKEY_CURRENT_USER".
EditRegKey uses a custom registry data type to use, by using Nucleus.RegType.DWord for example. The last word can be of the same name of RegistryValueKind enum.
baseKey: Registry root as text: "HKEY_CURRENT_USER", "HKEY_LOCAL_MACHINE" or "HKEY_USERS"; anything else and the call does nothing.sKey: Key path under the root, e.g. "Software\\Company\\Game"; created if missing. Before the first edit Nucleus exports it to utils\backup\<last part>.reg.subKey: Name of the value to set inside that key.value: The data to write; null does nothing. For RegType.Binary the value's text is stored as UTF-8 bytes.regType: Value type: Nucleus.RegType.String, DWord, QWord, Binary, ExpandString or MultiString (the names of .NET's RegistryValueKind).
✎ Parameters: AI-written from the Nucleus source.
Category: Registry
Is this right?
Tell us what's wrong