0

I am trying to create an Installation package (MSI) using the Microsoft setup project which requires admin privileges.

On Windows 7, the UAC prompt does not show up. Message window says need admin permissions.

How to make Windows 7 prompt UAC for a non-privileged user?

When a non-privileged user on windows 10 tries to install the MSI, it automatically prompts the UAC window.

  • Are you 100% sure your Win 7 system is actually set to display the UAC in the settings? – Broots Waymb May 07 '19 at 17:30
  • should I check that in User Account Control settings? – Gaurav Shivakumar May 07 '19 at 17:36
  • https://support.microsoft.com/en-us/help/975787/guided-help-adjust-user-account-control-settings-in-windows-7-and-wind – Broots Waymb May 07 '19 at 17:39
  • It works if I set "Always Notify" in Windows 7, but on Windows 10 UAC prompts even if UAC is set to "Never Notify". – Gaurav Shivakumar May 07 '19 at 17:48
  • Are there any entries in the **`LaunchConditions`** table? They will be spoofed on Windows 10, but probably not on Windows 7 - not sure. Check the compiled MSI - the one you actually install - [using the Orca tool or equivalent](https://stackoverflow.com/q/48482545/129130). What is in the table? )if anything). – Stein Åsmul May 07 '19 at 18:52

1 Answers1

0

Set the Package element's InstallPrivileges attribute to elevated. Or better, if you're creating a per-machine package, set the Package element's InstallScope attribute to perMachine and it will do the right thing for you.

<Product ...>
  <Package InstallScope='perMachine' />
Rob Mensching
  • 33,834
  • 5
  • 90
  • 130
  • All the above settings (WIX) work for Windows 10, but I am not able to get it to work for win 7. FYI I am using Visual Studio Installer. – Gaurav Shivakumar May 07 '19 at 17:50