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.

set `requestedExecutionLevel` option on windows will cause application crash

See original GitHub issue

I’m building 32bit application on windows using electron-builder 20.19.2, electron-updater 2.23.3 and electron 2.0.3

this is build section of my package.json:

“build”: { “appId”: “launcher”, “directories”: { “output”: “out” }, “win”: { “publish”: { “provider”: “generic”, “url”: “http://127.0.0.1/update/”, “channel”: “latest” }, “target”: [ { “target”: “portable”, “arch”: “ia32” } ], “asar”: true, “requestedExecutionLevel”: “requireAdministrator”, “files”: [ “dist/", "local_packages/”, “main.js”, “package.json” ] } },

When I set requestedExecutionLevel option to requireAdministrator or highestAvailable, the produced exe file could not be started.It looks like electron-builder generated a wrong format of manifest file.

The error message shows below:

The application has failed to start because the side by side configuration is incorrect please see the application event log or use the command line sxstrace.exe tool for more detail.

the manifest file in generated exe file shows below:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"><dependency><dependentAssembly><assemblyIdentity type="Win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity></dependentAssembly></dependency><trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"><security><requestedPrivileges><requestedExecutionLevel level="requireAdministrator" uiAccess="false"></requestedExecutionLevel></requestedPrivileges></security></trustInfo><asmv3:application xmlns:asmv3=“urn:schemas-microsoft-com:asm.v3”><asmv3:windowsSettings xmlns=“http://schemas.microsoft.com/SMI/2005/WindowsSettings”><dpiAware>true/pm</dpiAware><disableWindowFiltering xmlns="http://schemas.microsoft.com/SMI/2011/WindowsSettings">true</disableWindowFiltering></asmv3:windowsSettings></asmv3:application><ms_compatibility:compatibility xmlns:ms_compatibility=“urn:schemas-microsoft-com:compatibility.v1” xmlns=“urn:schemas-microsoft-com:compatibility.v1”><ms_compatibility:application xmlns:ms_compatibility=“urn:schemas-microsoft-com:compatibility.v1”><ms_compatibility:supportedOS xmlns:ms_compatibility=“urn:schemas-microsoft-com:compatibility.v1” Id=“{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}”></ms_compatibility:supportedOS><ms_compatibility:supportedOS xmlns:ms_compatibility=“urn:schemas-microsoft-com:compatibility.v1” Id=“{1f676c76-80e1-4239-95bb-83d0f6d0da78}”></ms_compatibility:supportedOS><ms_compatibility:supportedOS xmlns:ms_compatibility=“urn:schemas-microsoft-com:compatibility.v1” Id=“{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}”></ms_compatibility:supportedOS><ms_compatibility:supportedOS xmlns:ms_compatibility=“urn:schemas-microsoft-com:compatibility.v1” Id=“{35138b9a-5d96-4fbd-8e2d-a2440225f93a}”></ms_compatibility:supportedOS><ms_compatibility:supportedOS xmlns:ms_compatibility=“urn:schemas-microsoft-com:compatibility.v1” Id=“{e2011457-1546-43c5-a5fe-008deee3d3f0}”></ms_compatibility:supportedOS></ms_compatibility:application></ms_compatibility:compatibility></assembly>

some unreadable character  is in the beginning of this manifest file, so I guess maybe these character causes application crash

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
phuongnm153commented, Sep 18, 2018

I have the same issue when set option "requestedExecutionLevel": "requireAdministrator". Without this option, my app build success and working. image

0reactions
a1q123456commented, Oct 4, 2021

It’s been 2 years since I was opened this issue. So I think it’s okay to close it. If anyone has any questions, please feel free to reopen it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

RequestedExecutionLevel not worked - Microsoft Q&A
I am writing an application that any user, admin or not, can access. At startup an update of the program files under c:\Program...
Read more >
Error using keywords in VERSIONINFO structure on Windows 7
When the requestedExecutionLevel is present in the embedded application manifest, it overrides Installer Detection.
Read more >
Windows 10 Settings -> Recovery crashes
My windows has a problem where going into settings -> updates and security -> recovery causes the settings window to close (probably ...
Read more >
How User Account Control works (Windows) | Microsoft Learn
If the policy setting is set to Prompt for credentials, malware imitating the credential prompt may be able to gather the credentials from...
Read more >
Compatibility Fixes for Windows 10, Windows 8, Windows 7 ...
The fix blocks InstallShield from setting the value of RunAs registry keys ... is indicated when an application and computer appear to hang...
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