Skip to content
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

Can not work with pkg. #70

Closed
kkqy opened this issue Sep 17, 2019 · 2 comments
Closed

Can not work with pkg. #70

kkqy opened this issue Sep 17, 2019 · 2 comments

Comments

@kkqy
Copy link

kkqy commented Sep 17, 2019

If I use pkg(https://github.com/zeit/pkg) to pack my project,
this module can't work,and it shows:

Error: vbscript process reported unknown error code 1
    at ChildProcess.<anonymous> (E:\snapshot\client_installer\node_modules\regedit\index.js:298:20)
    at Object.onceWrapper (events.js:273:13)
    at ChildProcess.emit (events.js:187:15)
    at maybeClose (internal/child_process.js:961:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
Error: vbscript process reported unknown error code 1
    at ChildProcess.<anonymous> (E:\snapshot\client_installer\node_modules\regedit\index.js:298:20)
    at Object.onceWrapper (events.js:273:13)
    at ChildProcess.emit (events.js:187:15)
    at maybeClose (internal/child_process.js:961:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)

Is there any way to fix it?

@lhjt
Copy link

lhjt commented Nov 2, 2019

Have you tried setting an external VBS location in the package? Refer to #60 for more information (It's for ASAR but it may work for your app as well, take a look and see if it works). The readme also has information on how to use that.

@kessler kessler closed this as completed Sep 2, 2021
@iSued
Copy link

iSued commented Jul 13, 2022

I've done this way and i just need to have my package and vbs at the same level.
Obviously you can decide to change level.

    let regedit = require('regedit')
    const pathNode = require('path');
    const appDir = pathNode.resolve()
    await regedit.setExternalVBSLocation(appDir + '/vbs');
    regedit = require('regedit').promisified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants