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

Possibility to set ExecutionLevel for nsis portable #1440

Closed
marqu3z opened this issue Apr 7, 2017 · 4 comments · May be fixed by qcif/data-curator#563
Closed

Possibility to set ExecutionLevel for nsis portable #1440

marqu3z opened this issue Apr 7, 2017 · 4 comments · May be fixed by qcif/data-curator#563

Comments

@marqu3z
Copy link

marqu3z commented Apr 7, 2017

Hi, right now it is not possible to distribute portable app that needs admin privilege.
The only way is monkeypatching the portable template here: https://github.com/electron-userland/electron-builder/blob/master/packages/electron-builder/templates/nsis/portable.nsi#L5

As far as i see it is not even possible to use a custom script for portable app because if the target is portable the script option will not be considered.
https://github.com/electron-userland/electron-builder/blob/master/packages/electron-builder/src/targets/nsis.ts#L178

Is this something that could be fixed or is there another way i'm not aware of?

@develar
Copy link
Member

develar commented Apr 7, 2017

Hmm... Interesting. Are you sure that your app needs admin privilege for all run time? I strongly recommend you to use UAC when admin rights is required. Please see https://github.com/automation-stack/electron-sudo

@marqu3z
Copy link
Author

marqu3z commented Apr 7, 2017

Hi @develar
Yes we deeply investigated the alternatives.
In our case the app needs to change networks settings and restore them, and it can happen multiple times.
Using electron-sudo, every time the app needs to execute one of those network command the password prompt will show up.
This cause a very confusing and bad user experience, so we decided to drastically make the app run on each platform with admin privilege.
While for the other platform is a bit trickier because we had to patch the app after packing, for windows it seems just a matter of an option.

@develar
Copy link
Member

develar commented Apr 7, 2017

Solution: executionLevel option for portable.

You can expect it in 2 days.

@marqu3z
Copy link
Author

marqu3z commented Apr 7, 2017

awesome, thank you for the quick support.

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

Successfully merging a pull request may close this issue.

2 participants