3
votes

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)

2

2 Answers

3
votes

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.
3
votes

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" />