Closed afroewis closed 6 years ago
@muminasaad could you provide a pull request with exact details how to use it? I am getting "Folder not found" when using the method, even though I copied the vbs folder to ./assets/ and am calling regedit.setExternalVBSLocation("./assets/vbs/")
@Taxel I'm not sure using a relative path will work in most cases. Probably it's safer to use an absolute path? At least when running a packaged electron app.
This is how I do it in my electron app:
const vbsDirectory = path.join(path.dirname(electron.remote.app.getPath('exe')), './resources/foo');
regedit.setExternalVBSLocation(vbsDirectory);
Note that I move the node-regedit assets to the resources/foo
folder using electron-builder when building my application.
@afroewis merged, thank you for the PR
When I used this package, it worked when running my electron app during development, but not in the packaged application. By searching this repo's issues, I found https://github.com/ironSource/node-regedit/issues/46.
As the README doesn't say anything about
setExternalVBSLocation
, I think it would be useful to save pain for new users that want to use this package in their Electron app. As there are currently no docs, maybe it would be enough to explain this inREADME.md
.