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.

NSIS appExe requestedExecutionLevel not working?

See original GitHub issue

want: win-unpacked dir, ${APP_EXECUTABLE_FILENAME}.exe requestedExecutionLevel admin config:

      "perMachine": true,
      "oneClick": false,
      "allowElevation": true,

the ${APP_EXECUTABLE_FILENAME}.exe manifest always display result:

<?xml version="1.0" encoding="utf-8"?>

<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="*"/>
    </dependentAssembly>
  </dependency>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
      </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>
      <ms_compatibility:supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"></ms_compatibility:supportedOS>
      <ms_compatibility:supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"></ms_compatibility:supportedOS>
      <ms_compatibility:supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></ms_compatibility:supportedOS>
      <ms_compatibility:supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"></ms_compatibility:supportedOS>
      <ms_compatibility:supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"></ms_compatibility:supportedOS>
    </ms_compatibility:application>
  </ms_compatibility:compatibility>
</assembly>

i want <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
IDrinkMoreWatercommented, Jan 16, 2018

@SZzzzz my config,it‘s working

"win": {
      "icon": "resources/icon.ico",
      "requestedExecutionLevel": "requireAdministrator",
      "target": [
        "nsis"
      ]
    },
 "nsis": {
      "artifactName": "${productName}-${version}.${ext}",
      "perMachine": true,
      "oneClick": false,
      "guid": "21b4651a-e93e-4793-a19c-2f102a494a26",
      "allowToChangeInstallationDirectory": true,
      "menuCategory": false,
      "installerIcon": "resources/icon.ico",
      "installerHeaderIcon": "resources/icon.ico",
      "allowElevation": true,
      "warningsAsErrors": false,
      "installerLanguages": "zh_CN",
      "language": 2052,
      "deleteAppDataOnUninstall": true
    },
0reactions
cweeklycommented, Oct 23, 2018

@gjavi1 No, this issue was still in the backlog when I stopped work on the relevant project back in June. Thanks for reproducing it, anyway!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reference/RequestExecutionLevel - NSIS Wiki
Specifies the requested execution level for Windows Vista and Windows 7. The value is embedded in the installer and uninstaller's XML ...
Read more >
CRCCheck Failure with uiAccess - NSIS Forums
The problem is, NSIS fails to run my application due to this, I have changed the installer to use uiAccess and digitally signed...
Read more >
NSIS: Silently fails with RequestExecutionLevel user
This is not a complete installer script, it does not install anything, there are no sections and no pages! Please post a minimal...
Read more >
[NSIS-commits] SF.net SVN: nsis:[6728] NSIS/trunk
The final size will not always be what you requested; have a look at the output of the command for the actual size....
Read more >
NSIS Users Manual - Documentation & Help
software installations is one of the most irritating computer problems. A ... string is "C:\Program Files\Foo\app.exe", it will know to use "C:\Program.
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