Wix Interactions with Conditions, Properties & Custom Actions

http://www.mail-archive.com/[email protected]/msg05097.html gives an solution to republish the properties that were changed in the custom action immediately after it. Here is an example of how I have gotten it to work in my code: <?xml version=”1.0″ encoding=”utf-8″?> <Wix xmlns=”http://schemas.microsoft.com/wix/2006/wi”> <Fragment> <Binary Id=”ConnectionStringExtension.dll” SourceFile=”$(var.ConnectionStringExtension.TargetDir)$(var.ConnectionStringExtension.TargetName).CA.dll” /> <CustomAction Id=”MyCustomAction” BinaryKey=”ConnectionStringExtension.dll” DllEntry=”VerifyConnectionString” Execute=”immediate” /> <UI> <Dialog Id=”ConnectionStringDlg” Width=”370″ Height=”270″ Title=”Database … Read more

How to pass CustomActionData to a CustomAction using WiX?

Deferred custom actions can not directly access installer properties (reference). In fact, only CustomActionData property session.CustomActionData and other methods and properties listed here are available on the session object. Therefore, for a deferred custom action to retrieve a property such as the INSTALLLOCATION, you have to use a type 51 custom action — i.e. a … Read more

WiX tricks and tips

Keep variables in a separate wxi include file. Enables re-use, variables are faster to find and (if needed) allows for easier manipulation by an external tool. Define Platform variables for x86 and x64 builds <!– Product name as you want it to appear in Add/Remove Programs–> <?if $(var.Platform) = x64 ?> <?define ProductName = “Product … Read more