Per-User installation of an MSI as standard user on Vista is installing files into Administrators profile

Files are being installed into the Administrators Profile rather than to the Standard Users profile.

 

This does not appear to be the default behavior for an Admin assisted installation as per documentation on https://msdn2.microsoft.com/en-us/bb384154.aspx

 

"Windows Vista built-in installer detection prompts for consent when you run under UAC. A bootstrapper (Setup.exe) built with Visual Studio 2005 always prompts for consent, regardless of what it is installing. Because Setup.exe and all of its processes run with an administrator token on Windows Vista, the final application installation will be installed with elevated privileges. If a user runs Setup.exe with administrator-assisted elevation, the application will be installed under the elevated user's profile (not the administrator's profile)"

 

The setup.exe was embedded with a UAC manifest that had RequestedExecutionLevel = RequireAdministrator.

The Admin Assisted Installation feature is over-ridden due to this. There will be a prompt for elevation even before the MSI is launched by setup.exe

Changed the RequestedExecutionLevel = AsInvoker.

This caused the setup.exe to launch the MSI AsInvoker to begin with. Elevation prompt was seen only when there was a need to elevate, this caused Admin Assisted Installation to work correctly.

 

More Information

Documentation on https://msdn2.microsoft.com/en-us/bb384154.aspx

This document should be studied carefully before building MSI packages that use the Admin Assisted Installation feature.

 

Contributor : Ravi Shankar