简体   繁体   中英

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

这个问题帮助我创建了一个 MSI 文件 - https://docs.microsoft.com/en-us/answers/questions/256664/is-it-possible-to-create-a-setup-filemsi-in-visual.html现在,我如何创建不需要管理员访问权限的安装程序?

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:

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 (eg ProgramFiles). Since the installer does not have admin privileges, the installation will fail.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM