Read a single registry value.
Return type mirrors the registry type:
REG_SZ
REG_EXPAND_SZ
string
REG_DWORD
number
REG_QWORD
REG_MULTI_SZ
string[]
REG_BINARY
Uint8Array
Root handle, e.g. HKCU
HKCU
Subkey path, e.g. 'Software\\MyApp'
'Software\\MyApp'
Value name
const enabled = readRegistry(HKCU, 'Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings', 'ProxyEnable') as number; // 0 or 1 Copy
const enabled = readRegistry(HKCU, 'Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings', 'ProxyEnable') as number; // 0 or 1
Read a single registry value.
Return type mirrors the registry type:
REG_SZ/REG_EXPAND_SZ→stringREG_DWORD→numberREG_QWORD→number(JS float64; exact up to 2^53)REG_MULTI_SZ→string[]REG_BINARY/ other →Uint8Array