-
-
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
Machine-wide NSIS installer launches application as administrator #864
Comments
We do use |
From the NSIS UAC page, I see the following line in the code example:
Perhaps the electron-builder NSIS template is incorrectly requesting administrative privileges via |
No. one click machine wide installer must use admin because it is one click, not boring installer. I will investigate issue. |
Reproduced (to reproduce, your account should be not administrator). |
Fixed — StdUtils.ExecShellAsUser must be used. https://github.com/lordmulder/stdutils |
Thanks for spotting it and clear report. |
I just upgraded to 7.18.1, re-built my installer, and I am experiencing the same issue. |
My NSIS configuration: "nsis": {
"oneClick": false,
"perMachine": true,
"guid": "939693fe-aa4b-4da5-b1de-34700e4f1c83"
} |
I created test user without admin rights and tested — works for me (win 10). Ok — will try to test it again. |
Ouch, |
Correct. |
Every user of NSIS boring installer should upgrade to next electron-builder version as soon as possible. |
I include file 'installer.nsh' .test successful |
@anran800 thanks for your solution, it helped 👍 !macro customInstall
StrCpy $appExe "$INSTDIR\${APP_EXECUTABLE_FILENAME}"
WriteRegStr HKCU "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" "$appExe" "RUNASADMIN"
!macroend |
for uninstalling the rule when application uninstalls i used: !macro customUnInstall
DeleteRegValue HKCU "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" "$INSTDIR\${APP_EXECUTABLE_FILENAME}"
!macroend |
@anran800 Why do you need to do it, what's wrong? This issue was fixed. |
@develar what do you mean fixed? |
@DxCx So, please do not comment here, but create new issue and request feature :) |
that's not a new issue :) |
@DxCx This issue about "installer by mistake runs installed app as admin" ;) |
then you are right @develar , my bad =) i was getting here searching the exact opposite 🤣 |
With a machine-wide NSIS installer (a UAC dialog popped when launching), having the "Run $application" checkbox checked, my application runs with administrative privileges; I expected my application to be run with non-elevated privileges.
The text was updated successfully, but these errors were encountered: