Registry Functions
The Registry category contains functions to create and manipulate Registry entries.
Registry hives
Section titled “Registry hives”The sHandle parameter selects the registry hive. It accepts these values, which aren’t case-sensitive:
| Short name | Full name |
|---|---|
HKLM |
HKEY_LOCAL_MACHINE |
HKCU |
HKEY_CURRENT_USER |
HKCR |
HKEY_CLASSES_ROOT |
HKU |
HKEY_USERS |
HKCC |
HKEY_CURRENT_CONFIG |
Any other value makes the function return FALSE.
32-bit and 64-bit registry
Section titled “32-bit and 64-bit registry”Functions that end in X64 always use the 64-bit registry view on 64-bit Windows, also when the script runs in a 32-bit process.
Functions without X64 use the registry view of the process that runs the script. In a 32-bit process on 64-bit Windows, Windows redirects some keys, such as HKLM\SOFTWARE, to HKLM\SOFTWARE\WOW6432Node.
Return values
Section titled “Return values”All registry functions return TRUE if they succeed and FALSE if they fail. Functions that read from the registry store the result in global variables, such as gsValue, giValue, gaValue and gbValue. Each function page describes which variables the function sets.
In this section
Section titled “In this section”- Reg_CommitChanges
- Reg_CreateKey
- Reg_CreateKeyX64
- Reg_DeleteKey
- Reg_DeleteKeyX64
- Reg_DeleteTree
- Reg_DeleteTreeX64
- Reg_DeleteVariable
- Reg_DeleteVariableX64
- Reg_EnumKey
- Reg_EnumKeyX64
- Reg_EnumVariable
- Reg_EnumVariableX64
- Reg_ExistKey
- Reg_ExistKeyX64
- Reg_ExistVariable
- Reg_ExistVariableX64
- Reg_GetBinary
- Reg_GetBinaryX64
- Reg_GetExpandString
- Reg_GetExpandStringX64
- Reg_GetInteger
- Reg_GetIntegerX64
- Reg_GetMultiString
- Reg_GetMultiStringX64
- Reg_GetQword
- Reg_GetString
- Reg_GetStringX64
- Reg_GetValueType
- Reg_GetValueTypeX64
- Reg_GetVariableType
- Reg_SetBinary
- Reg_SetBinaryX64
- Reg_SetExpandString
- Reg_SetExpandStringX64
- Reg_SetInteger
- Reg_SetIntegerX64
- Reg_SetMultiString
- Reg_SetMultiStringX64
- Reg_SetQword
- Reg_SetString
- Reg_SetStringX64
- Reg_UpdateExpandString
- Reg_UpdateExpandStringX64
- Reg_UpdateMultiString
- Reg_UpdateMultiStringX64
- Reg_UpdateReg