Request administrator rights for portable application
See original GitHub issue- Version: 22.4.1
- Electron Version: 8.2.2
- Electron Type (current, beta, nightly): current
- Target: portable
Hi,
My issue is rather a question. I’m trying to package an application with the portable target that requests administrator privileges to run. I set the option in the electron-builder.json:
"win": {
"icon": "dist/assets/icons",
"target": [
"portable"
],
"requestedExecutionLevel": "requireAdministrator"
},
The unpacked exe file requests administrator rights to be open, but the packed, portable exe file does not. Is there a way to make the portable exe file request administrator rights?
I have looked into the manifest of the portable exe file, and it shows that the requestedExecutionLevel
is set to asInvoker
instead of requireAdministrator
. I also tried editing the manifest with mt.exe
, but then when I want to launch the app, it crashes with an NSIS error.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
Run-As-Administrator rights for Portable Apps
Almost none of our apps require admin rights. The HKCU area of the registry is read and written just fine by Limited accounts....
Read more >windows 10, grant a specific application PERMANENT ...
Click on Start and select All apps, locate the app, right click on it and ... Check the option 'Run this program as...
Read more >How to Run Program without Admin Privileges and to Bypass ...
An app may need the administrator privileges to modify some files (logs, configs, etc.) in its own folder in the C:\Program Files (x86)\SomeApp....
Read more >How do I install an application to my USB and get it to work on ...
Most applications require administrative privileges not only to write to the disk (in your case USB) but also: Write to registry.
Read more >Run As Administrator (App Elevation) - Admin By Request
So what happened? Admin By Request intercepted the browsers' request to elevate with admin rights to install the software and then executed the...
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
@koppa96 I foud a solution
I know this issue is closed, but I’d like to point out that the options which solve the issue do not appear in electron-builder’s documentation. Are there any plans to add them? This issue stumped me for days before I came across this post. If it were documented, it would’ve saved me a lot of time.