Brandon: Deferred Custom Actions in WiX and the data they love!
FFS, this should not be so hard.

Ok, so for future reference, when creating a deferred custom action for a setup project, you can only pull data out of the CustomActionData session property.

Of course, you can't just go and set that property, you need to have a type 51 custom action that sets it for you.

And the property you set is not called CustomActionData, its the name of the CustomAction you are trying to use.

So, this is how its done...

Code:


<!-- The Property MUST be the same name as the CA that you are going to invoke -->
<CustomAction Id="CAEnableCLR_DATA" Property="CAEnableCLR" Value="WhateverValueHere" />
<CustomAction Id="CAEnableCLR" BinaryKey="$(var.CAServerConfig.TargetFileName)" DllEntry="EnableCLR" Execute="deferred" Impersonate="no" />

<InstallExecuteSequence>
<Custom Action="CAEnableCLR_DATA" After="InstallSqlData">NOT SKIPINSTALLSQLDATA</Custom>
<!-- Schedule the actual CA to run after the Type 51 part -->
<Custom Action="CAEnableCLR" After="CAEnableCLR_DATA">NOT SKIPINSTALLSQLDATA</Custom>
</InstallExecuteSequence>



Frustrated: Why cant they wait til I get back to release...


Tags (beta): wix

Comments (0)