I want to create a new registry entry in Windows 7, set, read and edit the value of the registry key using Node.Js
Check windows module
Few examples from the docs:
v = registry('HKLM/Software/Microsoft') // wrapped in objects allowing further fluent commands
v.someValue.remove() // delete value
v.add('newValue', 'myValue') // add new value
v.add('newKey') // a key is like a folder
v.subKey // getter which goes down one level deeper
x = registry('HKCU/Some/Random/Place')
x.add('newName', v.someValue) // clone a value
Alternatively you can check regedit, here are some snippets from docs:
var regedit = require('regedit')
regedit.list('HKCU\\SOFTWARE', function(err, result) {
...
})
regedit.createKey('HKCU\\Software\\MySoftware\\foo', function(err) {
...
})
regedit.putValue({
'HKCU\\Software\\MySoftware\\foo': {
'myValue3': {
value: ['a', 'b', 'c']
type: 'REG_MULTI_SZ'
}
}
}, function(err) {
...
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With