1.0.1 • Published 9 months ago

registry2json v1.0.1

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
9 months ago

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);
	});
1.0.1

9 months ago

1.0.0

9 months ago