Kick names, take ass.
8-08-2008 5:43 pm
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)

10-23-2007 1:44 am
Brandon: WTF is with the Windows Installer
So, why does the Setup project creator in Visual Studio 2005 basically suck, and nobody can seem to write a decent tutorial on WiX so it doesn't seem incredibly complicated. Not to mention that writing custom actions in managed code is apparently a no-no. That makes doing custom actions rather difficult when the built in ones are rather lacking, IMO.

Sure I can use managed code to write custom actions when creating a Setup project in Visual Studio 2005, but the UI is quite limited, plus the progress bar is just random in how it goes, and I can't put more detailed information on the UI.

Anyways, I'm just ranting.





Tags (beta): code, wix, windows installer

Comments (2)

Log In
Username:

Password:

Public Terminal

Lyric
All alone in a crowded room, silhouetted and ready to bloom...
User Journals
Your Hosts
Links