4

I have defined a few Custom Actions in my WIX setup, and these actions call third party EXE's that our application depends on. The user decides to install or ignore these 3rd party applications from the feature tree. My CustomAction and binary tags look like this:

<CustomAction Id='NL220_Action' BinaryKey='NL220EXE' Return='asyncWait'  />
<Binary Id="NICEXE" SourceFile="..\NL220.exe" />

<CustomAction Id='NIC_Action' BinaryKey='NICEXE' Return='asyncWait'  />
<Binary Id="NICEXE" SourceFile="..\NIC.exe" />

Furthermore, my InstallExecuteSequence tag looks like this:

<InstallExecuteSequence>
    <Custom Action="NL220_Action" After="InstallFinalize"><![CDATA[(&Optional_NL220=3)]]></Custom>
    <Custom Action="NIC_Action" After="NL220_Action"><![CDATA[(&Optional_NIC=3)]]></Custom>
</InstallExecuteSequence>

Everything works fine: the user can select which 3rd party installer packages to run, and these are then run when the installer finishes. The problem is that if the user selects both 3rd party installers, they are run at the same time, thus ignoring the After="NL220_Action" attribute of the second custom action. Any ideas why this is?

1 Answer 1

2

Per Custom Action Return Processing Options, the wait of asyncWait occurs at the end of a sequence. Use of this value means that you need the action to succeed, but you don't care exactly when it succeeds. If it waited for the custom action to finish before continuing onward, it would be synchronous. If you need to wait for the first to complete before running the second, then either you need to make the first action synchronous, or possibly combine both actions into a single asynchronous action which itself runs the two sub-actions in ordered sequence.

Sign up to request clarification or add additional context in comments.

1 Comment

It was my understanding that the return attribute defines the relationship between the main thread and the custom action threads (thus run the custom action asynchronously with the main thread). I've changed the return value to 'check' and that works as expected, thanks Michael.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.