2017-02-21 102 views
1

我發現,取消按鈕應該這樣定義:如何定義在WiX Toolset中按下取消按鈕(在卸載時)時執行的自定義動作?

<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中的對話框元素不能將自定義操作作爲子元素,因此應在哪裏定義自定義操作?

兩個與相關信息的鏈接:

回答

0

最後,我通過使用自定義操作與特定領域 「的OnExit」 解決了這個。因此,您只需創建自定義操作並將其鏈接到:

<Custom Action="MyAction" OnExit="cancel" /> 
相關問題