Executing Custom Actions immediately in WIX

*爱你&永不变心* 提交于 2019-12-22 09:56:58

问题


Is there any way to execute a custom action in WIX as soon as the first dialog (welcome) appears?

The requirement is to check prerequisites, and some of those require a custom action.

The custom action could be executed as we click to the next dialog, but then the standard WIX prereqs are determined apart from our custom prereq.

(The custom action we need is to check that IIS 6 Metabase Compatibility is turned on and a registry search does not work on x64 machines with a 32-bit installer)


回答1:


Add something like:

<Custom Action="MyCustomAction" Before="FindRelatedProducts">1</Custom>
  • Instead of FindRelatedProducts you may need to place other standard action. You can simply open your current msi in Orca to see InstallExecuteSequence.
  • Instead of "1" condition you may need to place something another.



回答2:


I use something like this...

<InstallExecuteSequence>
        <Custom Action="CA_DoSomething" After="FindRelatedProducts">
            <![CDATA[1]]>
        </Custom>    
</InstallExecuteSequence>
<InstallUISequence>
        <Custom Action="CA_DoSomething" After="FindRelatedProducts">
            <![CDATA[1]]>
        </Custom>
</InstallUISequence>

<CustomAction Id="CA_DoSomething" Error="Error message goes here" />


来源:https://stackoverflow.com/questions/2639176/executing-custom-actions-immediately-in-wix

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