9

We use Wix to create our MSI installer. We have a few custom actions that work great when using the installer normally with a GUI, but when using silent install (with "msiexec /qb /i" ), the custom actions won't run.

What can I do to make them work through Wix?

4

3 回答 3

8

我建议你阅读(如果需要,可以读几遍……一开始我花了一段时间):

Windows Installer 中自定义操作的安装阶段和脚本内执行选项

编写问题时需要考虑很多事情,详细信息都在这篇写得很好的文章中。基本上听起来你只将自定义操作放在 UI 序列中而不是执行序列中,但除此之外还有其他事情,你应该确保你做得正确。

于 2011-02-17T13:35:05.030 回答
0

他们只是不运行或失败吗?它们可能会被限制在安静模式下运行(请参阅UILevel属性)。如果他们失败了,他们可能会缺少一些来自完整 UI 模式的用户的输入信息(属性)。

无论如何,详细日志应该为您提供更多信息。

于 2011-02-17T11:36:19.870 回答
0

您可以在 ExeCommand 中设置“[UILevel]”并通过参数访问它。

 <CustomAction Id="customActionId" BinaryKey="InstallerProgram" ExeCommand="[UILevel]" Execute="deferred" Return="check" />


    static void Main(string[] args)
    {
     var uiLevel = args[0]; //==> [Here is the UILevel][1]
    }
于 2015-12-10T14:20:54.213 回答