Fork of @vscode/windows-registry with prebuilt binaries.
The upstream package requires a C++ build toolchain at install time. This fork ships prebuilt NAPI binaries for
win32-x64andwin32-arm64, so no build tools are needed on the target machine.
Native node module to access the Windows Registry.
This package installs cleanly on all platforms and architectures — no need for
optionalDependencies. On non-Windows platforms, all functions return
undefined (the same as when a registry key doesn't exist on Windows), so
calling code doesn't need platform checks.
npm install @photostructure/windows-registryconst { GetStringRegKey } = require('@photostructure/windows-registry');
console.log(GetStringRegKey('HKEY_LOCAL_MACHINE', 'SOFTWARE\\Microsoft\\Windows\\CurrentVersion', 'ProgramFilesPath'));Development requires npm 11.10 or later and a Node.js version accepted by
node-gyp 13: ^22.22.2 || ^24.15.0 || >=26.0.0. CI builds on Node 24.19.0.
npm ci # install the committed dependency versions
npm run build:native # rebuild the prebuilt binary
npm run analyze:native # rebuild with gated MSVC static analysis
npm run sanitize:native # rebuild win32-x64 with AddressSanitizer
npm run test:sanitize # prove ASan catches a defect, then run the tests under ASan
npm test # build, verify hardening, compile, and testUpstream copyright Microsoft Corporation.