-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
NSIS does not complete installation when allowElevation is true #924
Comments
@aesalazar Thanks for clear issue report. Yes, I can confirm that it is a known issue that UAC doesn't work correctly. It was not fixed yet because it is not easy to reproduce and in general, it works. Could you please specify – is your user Administrator or not? |
Duplicates #767 |
Sorry for the dup, have no idea why I didnt see that when I searched. Yes, I can confirm that in all case I was admin since I was logged in as myself on my dev machines. |
@aesalazar Next week I am on vacation and cannot promise that it will be fixed soon. I have inspected UAC code numerous times but it seems it is not yet correct :( I will check it again. |
No problem, thanks for all the effort you have done so far! |
Can it be confirmed that allowElevation works when oneClick is set to false? I have been struggling with this for a little while and thought it might just be something with the way I was building. But I have seen it on multiple systems and multiple project.
I have a package.json file with this for the build section:
I have oneClick turned off because I would like the user to be able to install for just them OR the entire machine ("Anyone"). In order to do a global install you obviously need admin rights which it can obtain during installation when UAC prompts.
Here is where I run into issues. With several apps I have tried on they install fine for the user but the global install almost always fails right after hitting "Yes" when prompted by UAC. On one machine it has a popup message saying "Error decompressing data! Corrupted installer?". But on others it just keeps going and as though it completed with the option to Run after closing the installer checked. It does not run the program however. Funny thing is if I try running the installer few more time it will eventually work.
It seems to create the c:\program files\ folder and even copy the files. It fails to create the icons. and add an entry to Add/Remove programs. And if I try to manually run the exe in program files folder it gives an error about node.dll is bad.
Now, the kicker is, if I right-click the same setup.exe and "Run as Administrator" (after cleaning out the program files folder) it all works just fine. So I can only concluded that it is a problem with allowing the elevated privileges with the installation exe already running.
I can set allowElevation to false which will force the user to Run as Admin but most would not know to do that. It would be great to get it all working as it should.
Thanks for any help. I created a branch that you can test this out on:
https://github.com/aesalazar/ElectronSandbox/tree/electron-builder
Thanks
Ernie
The text was updated successfully, but these errors were encountered: