regedit-simple
A very simple, and incomplete registry editor for Node.js.
These functions are enough for me. Need more? Create issue!
Installation
$ npm install --save regedit-simple
Example
var regedit = require('regedit-simple');
regedit.addKey({
target: 'HKCU\\Software\\TestDemo',
name: 'MyApp',
value: 'heyLookAValue',
type: 'REG_SZ'
}).then(function(result) {
console.log(result);
regedit.getKey({
target: 'HKCU\\Software\\TestDemo'
}).then(function(result) {
console.log(result);
regedit.delete({
target: 'HKCU\\Software\\TestDemo'
}).then(function(result) {
console.log(result);
})
})
})
Api
Include in your project
var regedit = require('regedit-simple');
regedit.get(string target)
Get at what is contained in a particular Registry key(target)
regedit.query('HKEY_CURRENT_USER\\Software\\7-Zip').then(funciton(data){
data={
ths: 'HKEY_CURRENT_USER\\Software\\7-Zip',
values:
{
Path64: 'C:\\Program Files\\7-Zip\\',
Path: 'C:\\Program Files\\7-Zip\\'
},
valuesTypes: {
Path64: 'REG_SZ',
Path: 'REG_SZ'
},
childsList: [
'HKEY_CURRENT_USER\\Software\\7-Zip\\FM'
],
childsListAbs: ['FM']
}
});
Aliases: regedit.query, regedit.getKey
regedit.addKey(object)
Add keys and values to the Registry
regedit.addKey({
target:'string',
name:'string',
type:'string',
value:'string'
});
Aliases: regedit.add
regedit.delete(object)
Delete keys and values to the Registry
regedit.delete({
target:'string',
name:'string' or 'don`t set(undefined)',
del_default:bool or 'don`t set(undefined)',
del_all:bool or 'don`t set(undefined)'
});
Aliases: regedit.del
Notes
- If name is specified, it will return the single value (or a message indicating none is available).
TODO
- Testing
- Support specified names