2

this question helped me create an MSI file - https://learn.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?

mebunnu
  • 115
  • 1
  • 10
  • you think it's wise for a system to allow _non-admins_ to install software? – Franz Gleichmann Nov 15 '21 at 11:35
  • 1
    @FranzGleichmann I have to create an MSI installer which gets installed for standard users in my organization without entering admin credentials, is this possible? if yes, how can i create such msi? thank you. – mebunnu Nov 15 '21 at 11:41
  • Take a look here: https://www.reddit.com/r/sysadmin/comments/7bt5jb/allowing_a_single_msi_to_be_installed_wo_admin/ – Isparia Nov 15 '21 at 11:54
  • 1
    a better solution might be to roll out the msi via the domain - ask your local windows network admin for help – Franz Gleichmann Nov 15 '21 at 12:03
  • @absolutealgorithm One of the approaches would be to use WiX toolset instead of the Microsoft Visual Studio Installer Setup project and use [non-Admin](https://stackoverflow.com/a/14358274/8607180) install. – Sasha Nov 15 '21 at 13:31
  • you can try to install your MSI in per user mode by setting the 2 properties ALLUSERS and MSIINSTALLPERUSER : `msiexec /i "package.msi" ALLUSERS=2 MSIINSTALLPERUSER=1` – Christophe Nov 15 '21 at 23:06
  • I will try to do it with the help of WiX toolset and get back to you guys, thank you for the help. – mebunnu Nov 19 '21 at 04:10

2 Answers2

1

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:

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
1

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.

J.Tribbiani
  • 454
  • 3
  • 9