question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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?

image

[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:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:35 (9 by maintainers)

github_iconTop GitHub Comments

7reactions
omarkadrycommented, Jun 26, 2018

I had to downgrade to 20.4.1, the issue appears to be in 20.5.1 onward

6reactions
develarcommented, Nov 1, 2018

Where is 20.31.0 coming from?

https://github.com/electron-userland/electron-builder/releases/tag/v20.31.0

Great, so, I will close issue, thanks for confirmation.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found