Take custom actions immediately in WIX

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

The requirement is to check the preconditions, and some of them require special action.

A custom action can be performed when we go to the next dialog, but then the WIX standard prerequisites are defined separately from our custom pre-code.

(We need to verify that IIS 6 metabase compatibility is enabled and registry lookup does not work on x64 machines with a 32-bit installer)

+2


a source to share


2 answers


Add something like:

<Custom Action="MyCustomAction" Before="FindRelatedProducts">1</Custom>

      



  • Instead of FindRelatedProducts, you may need a different standard action. You can just open your current msi in Orca to see InstallExecuteSequence.
  • Instead of the "1" condition, you might want to place something else.
+2


a source


I am using 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" />

      

+2


a source







All Articles