I'm trying to share a property between several products, which is not set by default. Except for one product, where I want to set it to a value.
So in shared.wxi:
<Include>
<Property Id="MYPROP" Secure="yes"></Property>
</Include>
And in product.wxs:
<Wix>
<Product>
<?include ..\shared\shared.wxi?>
<SetProperty Id="MYPROP" Value="1" After="InstallInitialize"/>
</Product>
</Wix>
But our build system complains about:
error LGHT0094 : Unresolved reference to symbol 'WixAction:InstallUISequence/InstallInitialize' in section 'Product:{583365A4-93C2-434A-BCD8-8A1035DF2AC7}'
I'm not even sure if After="InstallInitialize"
(or Before=...) is the right place, I just want to set the property for this product right after the include but before anything else is considered. Also, I'm pretty much clueless about the whole WIX system, I'm just trying to fix something quickly while the knowledgable colleague is on vacation.
UPDATE - Now I tried this instead of SetProperty
, but still get the same error:
<CustomAction Id="CA_SETMYPROP" Property="MYPROP" Value="1" />
<InstallUISequence>
<Custom Action="CA_SETMYPROP" Before="InstallInitialize" />
</InstallUISequence>
UPDATE 2 - Now I replaced InstallUISequence
with InstallExecuteSequence
and it does what I want. See Rob Mensching's answer for an explanation and an alternative solution.
<CustomAction Id="CA_SETMYPROP" Property="MYPROP" Value="1" />
<InstallExecuteSequence>
<Custom Action="CA_SETMYPROP" Before="InstallInitialize" />
</InstallExecuteSequence>