Skip to content
 
 

Repository files navigation

@photostructure/windows-registry

npm version Build

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-x64 and win32-arm64, so no build tools are needed on the target machine.

Native node module to access the Windows Registry.

Cross-platform support

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.

Installing

npm install @photostructure/windows-registry

Using

const { GetStringRegKey } = require('@photostructure/windows-registry');
console.log(GetStringRegKey('HKEY_LOCAL_MACHINE', 'SOFTWARE\\Microsoft\\Windows\\CurrentVersion', 'ProgramFilesPath'));

Development

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 test

License

MIT

Upstream copyright Microsoft Corporation.

About

Native node module to access the Windows Registry

Resources

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages