Elevated instructions needed for MSI Installer C# VS Projects


We have configured an MSI installer using Visual Studio Projects and it works properly when installing. However, when someone attempts to uninstall, they are prompted for elevated access which not everyone has.

We need a way for all users to be able to uninstall the same way that anyone can install it.

Any help would be greatly appreciated. Thank you in advance.

To allow all users to uninstall the MSI installer without requiring elevated access, you can modify the installer to run with elevated privileges during uninstallation.

  1. Open the Visual Studio project for the MSI installer.
  2. Go to the Solution Explorer and locate the setup project.
  3. Right-click on the setup project and select “View” > “Custom Actions”.
  4. In the Custom Actions window, right-click on “Uninstall” and select “Properties”.
  5. In the Properties window, set the “InstallerClass” property to “false”.
  6. Set the “CustomActionData” property to “/u”.
  7. Build and rebuild the setup project to generate a new MSI installer.

With these changes, all users should be able to uninstall the MSI installer without requiring elevated access.