Allow Burn variables to be set conditionally

May 10, 2013 at 4:21 PM
Hi,

Could you give me a pointer on how what I'd need to change in a custom bootstrapper (native rather than managed) to allow burn Variables to be set based on a condition/registrysearch?

Thanks,
May 10, 2013 at 4:34 PM
Looks like I'd be changing variable.cpp in the burn engine... :(
Coordinator
May 11, 2013 at 8:40 AM
You can do some conditional setting using the standard registry search, it can get a bit complex though. I would suggest using a BA function, see example Bundle11.wxs and the source "Template bafunctions". The advantage of doing using a BA function is that they are supported in next version of WiX (3.8).
May 13, 2013 at 9:23 AM
Where can I find "Template bafunctions"?
Coordinator
May 13, 2013 at 9:34 AM
It is in the examples folder of the download.
May 13, 2013 at 9:37 AM
sorry, just found it...

could you elaborate on how I'd implement and use a bafunction?
Coordinator
May 13, 2013 at 10:00 AM
Bundle11.wxs shows it being used and if you have a look at the source (https://wixextba.codeplex.com/SourceControl/latest#469090) you will see some more examples.
Mar 29, 2014 at 1:04 AM
I'm looking long and hard at Bundle11.wxs and I still don't understand what how bafunction is being used and why.

I see it is being included as a payload. ... then what?

My goal is to use the radio buttions to set an argument being passed to my MSI but i don't see how they are being linked here.
Coordinator
Mar 29, 2014 at 8:25 AM
In this case it is only used to demonstrate something happening when the install starts (it just waits for the DelayStart time).
Mar 31, 2014 at 9:24 PM
I'm totally confused now what's going on with Bafunctions and Burn Custom actions (re: https://stackoverflow.com/questions/14741629/wix-extended-bootstrapper-application-how-to-determine-which-radio-button-is-se?rq=1). Are these one and the same? Do I even need to include the Dll if i'm using Wix 3.8?
Coordinator
Mar 31, 2014 at 10:27 PM
Bafunctions and Burn Custom actions are the same thing, I changed the name to Bafunctions to avoid confusion with MSI custom actions.

If you are using 3.8 you need to write a bafunction dll and included that but you don't need the extended ba presented here as it is include as part of 3.8.
Apr 1, 2014 at 12:39 AM
Edited Apr 1, 2014 at 12:56 AM
Oookay.. slowly getting this all together now... so 3.8 now has built in support for the bafunctions. What about the radio buttons in burn on 3.8?

I'm trying to use radio buttons to set the parameters sent to the MsiPackage in my bundle but I'm having a heck of a time finding a clear answer or example how it's done. I see radio buttons in your bundle3 but the WixVariables for the XML and WXL only apply to your own ext dll?

EDIT: i've used the built properties to set the theme to your Bundle3Theme.xml:
     <bal:WixStandardBootstrapperApplication SuppressOptionsUI="yes"
                                             ThemeFile="CustomUI\Bundle3Theme.xml"
                                             LicenseUrl=""/>
However the radio buttons seem to be in a permanent disabled state... are they workable in 3.8?

SECOND EDIT: Forgot the Variables with the names of the Radiobuttons in my Bundle. Now the Buttons are enabled. I think this is workable now... will post later if I find problems :)
Coordinator
Apr 1, 2014 at 7:07 AM
Most of the features available with the extended BA are now available in WiX 3.8 (one exception is the second folder path as that was not generic enough).