Home > database >  How can I create a windows installer MSI that does not require admin access using setup project?
How can I create a windows installer MSI that does not require admin access using setup project?

Time:11-17

this question helped me create an MSI file - https://docs.microsoft.com/en-us/answers/questions/256664/is-it-possible-to-create-a-setup-filemsi-in-visual.html Now, how do i create an installer that doesn't require admin access?

CodePudding user response:

Disclaimer: MSI is an old technology, and its implementation of per-user (non-admin setups) is not ideal (severe technical limitations / restrictions, poor servicing for patching and upgrades, etc...). I would recommend to use some other deployment mechanism such as MSIX or AppV.


Non-Admin MSI / Per-User MSI: Nonetheless, here are some comments on the topic of per user installations and an example made using WiX:

CodePudding user response:

The Windows Installer project will create a MSI file where the user is allowed to select the install type, per-user or per-machine during installation.

The Windows Installer performs a per-user installation or per-machine installation depending the value of the ALLUSERS property, the value of the MSIINSTALLPERUSER property and the version of the operating system.

The value of the ALLUSERS property, at installation time, determines the installation context.

An ALLUSERS property value of 1 specifies the per-machine installation context.

An ALLUSERS property value of an empty string ("") specifies the per-user installation context.

So, in the Windows Installer project you need to define the ALLUSERS property to an empty string so that per-user installation be made. Please make sure that the resulted installer does not contain any registries created on the HKLM or does not install any file in locations that would require admin privileges (e.g. ProgramFiles). Since the installer does not have admin privileges, the installation will fail.

  • Related