Warning: Certain registry locations require 64-Bit Commands for 64-bit Windows machines.
Writes data to the specified registry value. This function takes three parameters:
(Default) value for a registry key by adding a trailing backslash \. Otherwise specify a name for an existing value or to create a new value. See the Name column in image below. (Default) value: HKEY_LOCAL_MACHINE\SOFTWARE\000Sample\ HKEY_LOCAL_MACHINE\SOFTWARE\SomeKey\Value\\Name is interpreted as the key HKEY_LOCAL_MACHINE\SOFTWARE\SomeKey with a value of Value\Name.REG_SZ - String value.REG_BINARY - Binary data displayed in hexadecimal format. Must be entered in decimal format.REG_DWORD - Binary data limited to 32 bits. Must be entered in decimal format.REG_EXPAND_SZ - An "expandable" string value holding a variable. Example: %SystemRoot%. REG_MULTI_SZ - A multiple string array. Used for entering more than one value, each one separated by a \0 string. Use \\0 to include \0 within a string array value.
Note: On 64-bit machines the example image above requires set64BitRegistryValue() because of the registry location.
Example
setRegistryValue("HKEY_CURRENT_USER\KaseyaAgent-HKCUTest\TestDirectoryPath", "c:\temp", "REG_SZ", "All Operating Systems", "Halt on Fail")