首页 > 解决方案 > WiX 工具集扩展:如何使自定义操作的顺序可配置?

问题描述

我正在使用自定义 WiX 工具集扩展,并且想知道是否可以使自定义操作的顺序可配置?

例如,我有两个动作:

  1. CreateFolder自定义操作:

    CustomAction Id="CreateFolder" BinaryKey="My.Ext.CA" DllEntry="CreateFolder" Execute="deferred"

  2. ExecuteSql自定义操作:

    CustomAction Id="ExecuteSql" BinaryKey="My.Ext.CA" DllEntry="ExecuteSql" Execute="deferred"

它们按以下顺序放置在 InstallExecuteSequence 中:

<InstallExecuteSequence>
            <Custom Action="CreateFolder" After="InstallValidate">
                NOT Installed
            </Custom>

            <Custom Action="ExecuteSql" Before="InstallFinalize">
                NOT Installed
            </Custom>
</InstallExecuteSequence>

它适用于先执行 CreateFolder CA,然后执行 ExecuteSql。但是,在某些情况下,WixExtension 用户需要先运行 ExecuteSql,然后是 CreateFolder。

我可以以某种方式指定要在 InstallExecuteSequence 中执行的 CA 订单并使其可配置吗?

标签: wixcustom-actionwix-extension

解决方案


推荐阅读