Access Windows registry with REG command line tool
yarn add windows-reg
import { query } from 'windows-reg';
console.log(
await query(
'HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run',
'OneDrive',
),
);
The example output would be
{
valueName: 'OneDrive',
valueType: 'REG_SZ',
value: '"C:\\Program Files\\Microsoft OneDrive\\OneDrive.exe" /background'
}
import { queryAll } from 'windows-reg';
console.log(
await queryAll(
'HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run',
true,
),
);
The example output would be
{
'HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run': [
{
valueName: 'OneDrive',
valueType: 'REG_SZ',
value: '"C:\\Program Files\\Microsoft OneDrive\\OneDrive.exe" /background'
},
{
valueName: 'Docker Desktop',
valueType: 'REG_SZ',
value: 'C:\\Program Files\\Docker\\Docker\\Docker Desktop.exe -Autostart'
},
...
],
'HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\ExampleSubKey': [
{
valueName: 'ExampleBinaryValue',
valueType: 'REG_BINARY',
value: <Buffer ad fa df ad fa df ad fa dc ae fa df ea e2 31 3f 23 23 e2 da fd af>
},
{
valueName: 'ExampleNumberValue',
valueType: 'REG_QWORD',
value: 1672226
},
...
],
}
In the project directory, you can run:
To lint the code and list the existing issues.
Usually VSCode will format the code when saving.
Builds the library for publishing to the dist
folder.
Run the tests. Attaching --watch
to watch the file changes.
ESlint, prettier and husky are hooked into the normal developing flows.
Licensed under MIT.