Question How can I install my .MSI in an elevated privilege state?
A method used to allow regular users to install an .MSI on their computer is to use the AlwaysInstallElevated keys. This method has you adds two registry keys to the current user and local computer hives.
This change has to be made before the installation of the .MSI. For example, if you want a typical user to install an .MSI based package on a secured computer, an Administrator needs to add the two registry keys before the regular user installs the .MSI.
To install a package with elevated (system) privileges, always set the AlwaysInstallElevated value to "1" under both of the following registry keys:
AlwaysInstallElevated (Per-Machine) REG_DWORD: If this value is set to "1" and the corresponding user value is also set, the installer always installs with elevated privileges. Otherwise, the installer uses elevated privileges to install managed applications and uses the current user's privilege level for non-managed applications.
In addition to the standard top-level registry keys, Windows Installer Editor provides a special registry key named HKEY_USER_SELECTABLE. Depending on the operating system, during installation a user can choose to install an application for the current user only or for all the users of the computer. Registry changes under this key are made to HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE, based on the user's choice during installation.
Additional information can be found in Windows Installer SDK Help under the term "AlwaysInstallElevated". Check both the per-user and per-computer examples.