【问题标题】:How to define a custom action to execute when the cancel button (at uninstallation) is pressed in WiX Toolset?如何定义在 WiX 工具集中按下取消按钮(卸载时)时要执行的自定义操作?
【发布时间】:2017-02-21 18:18:36
【问题描述】:

我发现取消按钮应该这样定义:

<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="Cancel">
    <Publish Event="SpawnDialog" Value="CancelButton"/>
</Control>

并且为自定义操作定义了一个发布事件,可以这样定义:

<CustomAction Id="CancelButton" Execute="immediate" ExeCommand='Program.exe"   Return="ignore"/>

出现错误:未解决对符号“Dialog:CancelButton”的引用

WiX 中的 Dialog 元素不能将自定义操作作为子元素,那么应该在哪里定义该自定义操作?

相关信息的两个链接:

【问题讨论】:

    标签: wix


    【解决方案1】:

    最后我通过使用带有特定字段“OnExit”的自定义操作解决了这个问题。因此,您只需要创建自定义操作并将其链接到:

    <Custom Action="MyAction" OnExit="cancel" /> 
    

    【讨论】:

      猜你喜欢
      • 2017-11-29
      • 2013-06-29
      • 1970-01-01
      • 2013-03-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-21
      相关资源
      最近更新 更多