James Bloomer
James Bloomer

Reputation: 5322

Executing Custom Actions immediately in WIX

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)

Upvotes: 4

Views: 2741

Answers (2)

saschabeaumont
saschabeaumont

Reputation: 22446

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

Upvotes: 3

VitalyVal
VitalyVal

Reputation: 1350

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.

Upvotes: 4

Related Questions