'UAC prompt electron when installing app in admin and non-admin user
below are our electron and builder versions,
"electron": "13.1.7" "electron-builder": "22.11.9"
in electron-builder file, our configuration have "win": { "requestedExecutionLevel": "requireAdministrator" }
and nsis configuration as below,
"nsis": {
"warningsAsErrors": false,
"installerIcon": "assets/icon.ico",
"runAfterFinish": true,
"oneClick": true,
"perMachine": false,
"installerHeader": "assets/installerHeader.bmp",
"installerSidebar": "build/installerSidebar.bmp",
"createDesktopShortcut": true,
"include": "build/installer-qa2.nsh",
"artifactName": "${productName}.${ext}"
}
as per above config, we have supported our application for both admin and non-admin user
we are facing 2 issues :-
at time of installing app in admin user -> asking UAC prompt only with Yes and No option, and every time running application, asking same prompt
at time of installing app in non-admin user -> not asking UAC prompt with admin credentials, app gets installed properly, but every time we run application after exit it, its asking UAC prompt every time
What we want to achieve -
in 1st point mentioned above, running app every time it should not ask for UAC prompt with Yes and No buttons
in 2nd point mentioned above, it should ask UAC prompt with admin credentials only at time of install/uninstall application, it should not ask for UAC prompt every time we run the application
Can anyone please help us out to achieve as per above mentioned points?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
