kessler / node-regedit

Read, Write, List and do all sorts of funky stuff to the windows registry using node.js and windows script host
MIT License
279 stars 45 forks source link

Undefined childProcess.execFile #112

Closed marco987 closed 1 year ago

marco987 commented 1 year ago

Hello. Trying to execute:

const regedit = require('regedit').promisified
var listResult = regedit.list('HKCU\\SOFTWARE')
console.log(listResult)

I get the following error:

Uncaught TypeError: Cannot read properties of undefined (reading 'apply') at execFile
var child = childProcess.execFile.apply(childProcess, arguments)

Can I get some suggestions please?

kessler commented 1 year ago

Hi @marco987 sorry for the extremely late response and for not responding to your email as well. I'm a not getting the same error as you, only the (expected) output Promise { <pending> }. the promisified version should be used with async/await or Promise apis.