gpt4 book ai didi

wix - 如何确保在 Windows Installer AdminInstall 期间安装功能

转载 作者:行者123 更新时间:2023-12-04 21:50:54 25 4
gpt4 key购买 nike

我正在使用 WiX 创建一个中等复杂的安装程序。我有一个 0 级功能,我想有条件地安装它,但也总是在管理员安装期间安装,以便更容易地通过管理员镜像进行修补。我已经尝试了几件事:

  1. 在 AdminUISequence 的 CostFinalize 操作之前设置一个属性(这是 msdn 声称评估条件表的时间)。这种情况下的情况如下:

    <Condition Level="1">( VersionNT >= 601 AND NOT FASTINSTALL = "1" ) OR INSTALLCONDFEATURE = "1"</Condition>

    其中 FASTINSTALL 和 INSTALLCONDFEATURE 都是 Secure 和 Admin。

  2. 使用 Windows Installer ACTION 或 EXECUTEACTION 属性。在这种情况下,条件类似于:

    <Condition Level="1">( VersionNT >= 601 AND NOT FASTINSTALL = "1" ) OR ACTION = "ADMIN"</Condition>

这些似乎都不起作用。我只是遗漏了什么,还是有其他更好的方法来做到这一点?

最佳答案

根据 MSI SDK,Feature/@Level="0"的功能永远不会安装在管理员安装中:

During an administrative installation, the installer creates a source image for all features in the product except those feature with 0 in the Level column of the Feature table.

所以你需要反转你的逻辑;将功能级别设置为大于零的值,并使用条件将其设置为零以进行非管理员安装。

关于wix - 如何确保在 Windows Installer AdminInstall 期间安装功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5411358/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com