-
Notifications
You must be signed in to change notification settings - Fork 71
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
Electron packaging with --asar argument #36
Comments
So perhaps what you can do is make an asar that doesnt include your external scripts and then you zip it all up in 7-Zip? |
That was my solution when I post the questions, i was hopping someone had done something different. I exclude the scripts folder and all the working files associated with their execution. |
One other suggestion is you can make the powershell commands in JS and addCommand one line at a time so yo never use external .ps1 |
Hi,
I think this is not an issue of the node-powershell but a limitation.
I have packaged my electron application with electron-packager with parameter --asar . (If I don't use asar argument it works.)
When using the app, I'm unable to execute PowerShell scripts because all the files are inside an app.asar file.
I already use the path variable like
ps.addCommand(path.join(__dirname, "/scripts/testing.ps1"), [ ....... ]);
I think I know the answer but Is it possible to use scripts inside that file?
Anyone know any alternative to hide the scripts?
Console Error
[MYPATH]\resources\app.asar\scripts\testing.ps1
is not recognized as the name of a cmdlet,function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
The text was updated successfully, but these errors were encountered: