-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
regedit.putValue():error:unsupported hive #109
Comments
At /lib/helper.js line 14 you need to patch the write function to function write(m) {
if (m) {
var b = module.exports.encode(m)
debug(b)
return stream.write(b)
}
return false
} function write(m) {
+ if (m) {
var b = module.exports.encode(m)
debug(b)
return stream.write(b)
+ }
return false
}
``` |
Or if you want to support falsy values, change the whole function to: module.exports.writeArrayToStream = function(arr, stream, optionalCallback) {
function write(m) {
if (m) {
var b = module.exports.encode(m)
debug(b)
return stream.write(b)
}
return false
}
while (arr.length) write(arr.pop())
if (arr.length === 0) {
stream.write(WIN_EOL, optionalCallback)
return
}
stream.once('drain', function() {
module.exports.writeArrayToStream(arr, stream, optionalCallback)
})
} |
reverting to 5.0.0 solved it for me :) |
@lister0701 please try version 5.1.2 and let me know if it solved your problem. |
@kessler Hi man, sorry for bringing this back up so late, but this is still a problem in 5.1.2, I'm using Win 11 and here's my current code, I just want to list apps that start up const promisifiedRegedit = require('regedit').promisified;
async function main() {
const listResult = await promisifiedRegedit.list('HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run');
console.log(listResult);
}
main();
``` |
will look into it. |
replace 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run' to 'HKCU\Software\Microsoft\Windows\CurrentVersion\Run' |
My Code:
Exception:
I feel very strange, clearly has been modified successfully
Brothers, please help me.
The text was updated successfully, but these errors were encountered: