app that build with requireAdministrator flag could not be update
- Electron-Builder Version: ^22.14.13
- Node Version: v14.17.6
- Electron Version: ^17.1.0
- Electron Type (current, beta, nightly): current
- Target: nsis
here is a part of the package.json file:
{
"win": {
"requestedExecutionLevel": "requireAdministrator",
"icon": "build/icons/icon.ico",
"extraResources": [],
"target": [
"nsis"
],
},
"nsis": {
"oneClick": false,
"allowToChangeInstallationDirectory": true,
"deleteAppDataOnUninstall": true
}
}
oneClick is set to false and perMachine is false by default, so users can install it only for their own account(not all users).
requestedExecutionLevel is set to requireAdministrator then the app will be run with admin privilege.
Here is the problem, if this user want to update the app while it is running. The nsis installer could not kill the app because it is not run under admin privilege. Then some file of the app could not be overwritten because the app locks them.
Maybe an option name forceElevation might help?
I also encountered this problem
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment, or this will be closed in 30 days.
This issue was closed because it has been stalled for 30 days with no activity.