WIX - Run custom action on installation cancellation

為{幸葍}努か 提交于 2021-01-27 07:29:38

问题


I'm wirintg an installer using WIX and I need to execute a custom action when a user press the "cancel" button.

I've created a custom action but I don't seem to find where to use that action.

Any ideas how can I do that?


回答1:


Try something like:

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



回答2:


OnExit="cancel" may fail if standard WIX UI is used (WIX assigns another action to "cancel" event). Action execution could be assigned to finish button in this case

<Publish Dialog="UserExit" Control="Finish" Event="DoAction" Value="MyAction">NOT Installed</Publish>


来源:https://stackoverflow.com/questions/2684075/wix-run-custom-action-on-installation-cancellation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!