Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

winreg

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

winreg - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

2

package.json
{
"name": "winreg",
"version": "0.0.4",
"version": "0.0.5",
"description": "provides access to the windows registry through the REG tool",

@@ -5,0 +5,0 @@ "main": "lib/registry.js",

node-winreg
===========
node module that provides access to the Windows Registry through the REG commandline tool
node module that provides access to the Windows Registry through the REG commandline tool
Installation
------------
```shell
npm install winreg
```
Usage
-----
Let's start with an example. The code below lists the autostart programs of the current user.
```javascript
var Winreg = require('winreg')
, regKey = new Winreg({
hive: Winreg.HKCU, // HKEY_CURRENT_USER
key: '\\Software\\Microsoft\\Windows\\CurrentVersion\\Run' // key containing autostart programs
})
// list autostart programs
regKey.values(function (err, items) {
if (err)
console.log('ERROR: '+err);
else
for (var i in items)
console.log('ITEM: '+items[i].name+'\t'+items[i].type+'\t'+items[i].value);
});
```
The following options are processed by the Winreg constructor:
+ __host__ the optional hostname, must start with the '\\\\' sequence
+ __hive__ the optional hive id (see below), the default is __HKLM__
+ __key__ the optional key, the default is th root key
The instances of Winreg provide access to a single registry key. The hive id can be one of the following:
+ __HKLM__ HKEY_LOCAL_MACHINE
+ __HKCU__ HKEY_CURRENT_USER
+ __HKCR__ HKEY_CLASSES_ROOT
+ __HKCC__ HKEY_CURRENT_CONFIG
+ __HKU__ HKEY_USERS
The key, if specified, has to start, but must not be terminated with a '\\' character.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc