Open lister0701 opened 1 year ago
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.
@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();
replace 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run' to 'HKCU\Software\Microsoft\Windows\CurrentVersion\Run'
My Code:
![image](https://user-images.githubusercontent.com/70565665/181174140-ec52d9a0-cb90-4580-a8ac-a1c98897da91.png)
Exception:![image](https://user-images.githubusercontent.com/70565665/181174259-6068f259-0067-4b07-9f01-e3d97e6915c8.png)
I feel very strange, clearly has been modified successfully![image](https://user-images.githubusercontent.com/70565665/181175025-6209380e-ea0d-4d90-81b1-e83c48f0c17e.png)
Brothers, please help me.