Skip to content
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

msiWrapped installer target causes seemingly unnecessary UAC prompt #8219

Open
robatwilliams opened this issue May 15, 2024 · 0 comments
Open

Comments

@robatwilliams
Copy link

  • Electron-Builder Version: 24.13.3
  • Node Version: v20.5.1
  • Electron Version: 30.0.5
  • Electron Type (current, beta, nightly): current
  • Target: msiWrapped

I understand the msiWrapped target wraps an NSIS installer inside an MSI.

The produced MSI causes a Windows UAC prompt when opened, which doesn't seem justified. I believe it should only be necessary later if the user chooses to install for all users.

I notice in the eventual NSIS dialog that the "all users" option doesn't require UAC elevation, presumably because it's already running elevated.

I tried setting msiWrapped.impersonate: true to cause the WiX action to run as the local user, however the UAC prompt remains. Verified what appears in the project.wxs file:

<CustomAction Id="RunInstaller" Return="check" Execute="deferred"
      HideTarget="no" Impersonate="yes" BinaryKey="WrappedExe" ExeCommand="" />

After setting this option, I further noticed that the "all users" install option in the eventual NSIS dialog is now an elevation (shield icon) button, but when clicked pops up an error dialog "This file does not have an app associated with it for performing this action. Please install an app or, if one is already installed, create an association in the Default Apps Settings page." - the title of the dialog box is "C:\Windows\Installer\MSIE1C4.tmp" which is the NSIS installer just with a different file extension.

When that temporarily unpacked NSIS installer is renamed to .exe and run separately, it doesn't cause an UAC prompt. So it appears that the MSI wrapper is causing the prompt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant