Cannot build the app with "requestedExecutionLevel": "requireAdministrator"
See original GitHub issue- Version: 20.13.4
- Target: windows
- Problem: cannot build app with “requestedExecutionLevel”: “requireAdministrator” | “highestAvailable” but working as “asInvoker”
So everything is working fine on electron-builder 20.5.1 then I decide to upgrade to version 20.13.4. Build the app and running as development is fine but when I build the app and open it is display the dialog message below. I’m also checking in Event Viewer and got this line.
Activation context generation failed for "pathToApp\app.exe".Error in manifest or policy file "pathToApp\app.exe" on line 0. Invalid Xml syntax.
Does this also relate to #2934?
[UPDATE]: I try to lower the version, but it is not working since version 20.6.0.
package.json
{
"resolutions": {
"webpack-sources": "1.1.0"
},
"electronWebpack": {
"renderer": {
"webpackConfig": "webpack.renderer.additions.js"
}
},
"dependencies": {
"electron-store": "^1.3.0",
"material-ui": "^0.20.0",
"react": "^16.3.2",
"react-dom": "^16.3.2",
"react-router-dom": "^4.2.2",
"source-map-support": "^0.5.6",
"typeface-roboto": "^0.0.54"
},
"devDependencies": {
"electron": "^2.0.1",
"electron-builder": "^20.13.4",
"electron-webpack": "^2.1.1",
"electron-webpack-ts": "^2.0.2",
"tslint": "^5.9.1",
"tslint-react": "^3.5.1",
"typescript": "^2.8.3",
"webpack": "^4.8.3"
},
"build": {
"productName": "MyApp",
"compression": "maximum",
"forceCodeSigning": false,
"asar": true,
"win": {
"icon": "resources/icon/icon.ico",
"requestedExecutionLevel": "highestAvailable"
}
}
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:35 (9 by maintainers)
Top Results From Across the Web
ClickOnce does not support the request execution level ...
If you are using "requireAdministrator" then it appears that you cannot use ClickOnce, and therefore cannot "Publish" your project. Original:.
Read more >Any Windows Target - electron-builder
requestedExecutionLevel = asInvoker “asInvoker” | “highestAvailable” | “requireAdministrator” | “undefined” - The security level at which the application ...
Read more >User Account Control, Digital Signing, and Manifests ... - Support
Microsoft highly recommends that the requested execution level of an application be asInvoker. Therefore, asInvoker is the default requested ...
Read more >How User Account Control works (Windows) | Microsoft Learn
If the application requires administrative access to the system, then marking the app with a requested execution level of "require administrator ...
Read more >ClickOnce Deployment vs. requestedExecutionLevel ...
requestedExecutionLevel = requireAdministrator ... All I saw was: A ClickOnce application cannot be run with administrator rights.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had to downgrade to 20.4.1, the issue appears to be in 20.5.1 onward
https://github.com/electron-userland/electron-builder/releases/tag/v20.31.0
Great, so, I will close issue, thanks for confirmation.