views:

606

answers:

1

I have a sequence of SetProperty actions which rely on each other. Here is a simplified example:

 <SetProperty Id="A" Before="AppSearch" Value="Hello" />
 <SetProperty Id="B" Before="AppSearch" Value="[A] world!" />

Property A needs to be set before property B in this case, so that the value of B becomes "Hello world!".

Since wix doesn't define an attribute to set the custom action name in this case, I don't have a name to use in the Before or After attributes.

I did notice that the execution order of these actions matches the alphabetical order of the property names, but that feels like an implementation detail that I should not rely on.

How do I cleanly enforce the order of SetProperty custom actions?

A: 

I used orca to discover the names generated for the custom actions. They turn out to be SetA and SetB. The following does what I want:

 <SetProperty Id="A" Before="AppSearch" Value="Hello" />
 <SetProperty Id="B" After="SetA" Value="[A] world!" />
Wim Coenen

related questions