In node.js I am trying to read the registry using the module regedit:
var regedit;
if ( process.platform == "win32" ) {
regedit = require("regedit");
}
...
if ( typeof regedit != "undefined" ) {
regedit.list("HKLM\SOFTWARE\CompanyName\ConfigFiles"
,(err, results) => {
if ( typeof err == "object" ) {
console.log(err);
} else {
...
}
});
}
The above errors and I know that if I launch the 32-bit version of regedit which is the default it cannot see the registry entry either, however if I go to C:WindowsSysWOW64 and then type regedit I launch the 64-bit version and I can see the key I’m interested in with the values. Is it possible to achieve the same with the node.js module?