-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
requestedExecutionLevel not working on target Portable Build #7566
Comments
I've had the same issue with 23.3.3. The built exe file would unpack, but it does not ask for admin elevation, the app does not launch at all. If I go to the unpacked directory (inside Temp) manually, I can see the exe file has a shield icon on it, and launching it would correctly ask for admin elevation. |
It's an issue of the documentation. By reading throughout the source code, I found another option related the elevation of portable builds, see here and here. So the correct configuration should be like this: {
// ...
win: {
target: [
{
target: "portable",
arch: [ "x64" ]
}
],
artifactName: "xxxxx",
requestedExecutionLevel: "requireAdministrator", // This is mentioned in the doc
},
portable: {
requestExecutionLevel: "admin", // However this is not
}
// ...
} You need to put |
The So the |
Wow Thanks a lot |
Version: ^23.6.0
Electron Version: ^19.0.0
Target: Portable
Hi, I am new to electron and electron-builder. I have this config (see below), and I am trying to make my application having requireAdministrator for requestedExecutionLevel. The build is successful, however, when I open my application, it doesn't ask/request to be run as administrator. Can someone help me on this? Thank you in advance.
I Think that when i tried double click my App,
Windows OS suggest Alert about usage of Administrator Auth.
}
The text was updated successfully, but these errors were encountered: