简体   繁体   English

如何使用安装项目创建不需要管理员访问权限的 Windows 安装程序 MSI?

[英]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... ).免责声明:MSI 是一项旧技术,它对每个用户(非管理员设置)的实现并不理想( severe technical limitations / restrictionspoor servicing for patching and upgrades etc... )。 I would recommend to use some other deployment mechanism such as MSIX or AppV .我建议使用其他一些部署机制,例如MSIX 或 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:非管理员 MSI / 每用户 MSI :尽管如此,这里有一些关于每用户安装主题的评论以及使用 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. Windows Installer 项目将创建一个 MSI 文件,允许用户在安装过程中选择安装类型、每用户或每台机器。

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. Windows 安装程序根据ALLUSERS属性的值、 MSIINSTALLPERUSER属性的值和操作系统版本执行按用户安装或按计算机安装。

The value of the ALLUSERS property, at installation time, determines the installation context. ALLUSERS属性的值在安装时确定安装上下文。

An ALLUSERS property value of 1 specifies the per-machine installation context. ALLUSERS属性值为1指定每台机器的安装上下文。

An ALLUSERS property value of an empty string ("") specifies the per-user installation context.空字符串 ("") 的ALLUSERS属性值指定每个用户的安装上下文。

So, in the Windows Installer project you need to define the ALLUSERS property to an empty string so that per-user installation be made.因此,在Windows Installer 项目中,您需要将 ALLUSERS 属性定义为空字符串,以便按用户进行安装。 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).请确保生成的安装程序不包含在 HKLM 上创建的任何注册表,或者不在需要管理员权限的位置(例如 ProgramFiles)安装任何文件。 Since the installer does not have admin privileges, the installation will fail.由于安装程序没有管理员权限,安装将失败。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何创建不需要管理员访问权限的Windows安装程序MSI - How can I create a windows installer MSI that does not require admin access 如何使用C#在cmd中以msd身份运行msi安装程序 - How to run msi installer in cmd as admin using C# 如何使用Visual Studio 2010为C#Web服务项目创建.msi安装程序? - How do I create an .msi installer with Visual Studio 2010 for a C# webservices project? 如何以编程方式创建MSI安装程序? - How to create an MSI installer programmatically? Windows安装程序(MSI)不会复制配置文件 - Windows installer (MSI) does not copy a config file MSI 安装程序不会创建空目录 - MSI Installer does not create empty directory 使用ac#Setup项目,如何在安装项目的msi中获取配置文件(nlog.config)? - Using a c# Setup project, how do I get a config file (nlog.config) into the msi for the Setup project? 使用MSI安装程序升级Windows服务 - Upgrading Windows service using MSI Installer 如何在Windows Installer安装过程中运行第三者exe(使用安装和部署项目) - how to run a 3rd party exe during a windows installer installation (using setup and deployment project) 在安装程序项目中的安装之前添加安装MSI的自定义操作 - Add custom action of installing msi before the setup in installer project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM