在 WIX 命令行中指定 InstallPrivileges 是受到限制还是提升的最佳方法是什么?

发布于 2024-07-09 05:10:47 字数 99 浏览 8 评论 0 原文

我想在 WiX 中创建一个 MSI,以便它可以使用命令行参数来指示它是按计算机安装还是按用户安装,从而指示是否引发 UAC 对话框。

实现这一目标的最佳方法是什么?

I want to create an MSI in WiX such that it can take a command line parameter to indicate whether it is a per-machine or per-user installation and consequently whether to raise a UAC dialog.

What is the best way to accomplish this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

不必了 2024-07-16 05:10:47

这是来自 的每台计算机/每用户的链接MSDN

因此,要更改命令行参数的值,您需要如下所示的内容:

msiexec /i myinstaller.msi ALLUSERS=[1|2]

另外,请查看此 来自 wix-users 的链接

This is the link for per-machine/per-user from MSDN.

so to change the values from the command line parameter, you'll need something like so:

msiexec /i myinstaller.msi ALLUSERS=[1|2]

Also, have a look at this link from wix-users

魔法少女 2024-07-16 05:10:47

UAC 对话框由 SummaryInformation 流中的一位控制。 不幸的是,这意味着它无法在“运行时”(安装/修复/卸载)进行控制。 您必须构建不同的 MSI 文件才能真正更改 UAC 提示符。

The UAC dialog is controlled by a bit in the SummaryInformation stream. That, unfortunately, means it cannot be controlled at "run time" (install/repair/uninstall). You have to build different MSI files to truly change the UAC prompt.

情绪少女 2024-07-16 05:10:47

我还无法在 Vista 中进行测试,但在 XP 中,对于每用户安装的有限用户和每台计算机安装的管理员用户,有效的方法如下:

msiexec /i myinstaller.msi ALLUSERS="" INSTALLDIR="C:\Documents和 Settings[用户名]\Local Settings\Application Data\My COmpany\My Program"

INSTALLDIR 可以是受限用户可以写入的任何内容。 以上是 Google Chrome 使用的目录。 从以下链接发现 ALLUSERS 属性实际上可以为空,与 1 或 2 不同,并且可以正确设置 ProgramDir 和桌面位置

http://blogs.msdn.com/astebner/archive/2007/11/18/6385121.aspx

I haven't been able to test in Vista yet, but what works in XP for limited user per user install and admin user per machine install is the following:

msiexec /i myinstaller.msi ALLUSERS="" INSTALLDIR="C:\Documents and Settings[Username]\Local Settings\Application Data\My COmpany\My Program"

The INSTALLDIR can be anything that a limited user can write to. The above is the directory Google Chrome uses. Found from the following link that the ALLUSERS property can actually be blank which is distint from 1 or 2 and that correctly sets the ProgramDir and Desktop locations

http://blogs.msdn.com/astebner/archive/2007/11/18/6385121.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文