registry2json
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Read Windows Registry without node-gyp and regedit

Installation via

$ npm install -s registry2json
const registry2json = require('registry2json').default;

// Get single value synchron
let value = registry2json.getValueSync("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", "ProxyServer");
console.info("Sync:", value);

// Get single value asynchron
registry2json.getValue("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", "ProxyServer")
	.then(function(val) {
		console.info("Async:", val);
	})
	.catch(function(err) {
		console.error(err);
	});

// Get all Values from path synchron
let values = registry2json.getAllValuesSync("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings");
console.info("Sync:", values);

// Get all Values from path asynchron
registry2json.getAllValues("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings")
	.then(function(values) {
		console.info("Async:", values);
	})
	.catch(function(err) {
		console.error(err);
	});
import registry2json from 'registry2json';

// Get single value synchron
let value = registry2json.getValueSync("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", "ProxyServer");
console.info("Sync:", value);

// Get single value asynchron
registry2json.getValue("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", "ProxyServer")
	.then(function(val) {
		console.info("Async:", val);
	})
	.catch(function(err) {
		console.error(err);
	});

// Get all Values from path synchron
let values = registry2json.getAllValuesSync("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings");
console.info("Sync:", values);

// Get all Values from path asynchron
registry2json.getAllValues("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings")
	.then(function(values) {
		console.info("Async:", values);
	})
	.catch(function(err) {
		console.error(err);
	});

Readme

Keywords

Package Sidebar

Install

npm i registry2json

Weekly Downloads

2

Version

1.0.1

License

GPL-3.0-or-later

Unpacked Size

746 kB

Total Files

15

Last publish

Collaborators

  • comlog.gmbh