[wix-users] Change burn's ExePackage InstallCommand value conditionally
Phill Hogland
phill.hogland at rimage.com
Wed Feb 8 06:37:18 PST 2017
The Burn engine does support changing the value of a Burn Variable in your BA. In the bundle declare a Variable with the Variable/@bal:Overridable='yes'. In your BA code make use of the related methods for reading and changing Engine Variables for string, secure string, number, and version objects.
Read a string variable (in C#):
result = myBA.Engine.StringVariables[variableName];
change it:
this.Wix.Engine.StringVariables[variableName] = value;
If using the WixStdBA then look at the example code which is in the wix source for a BAFunctions.dll in src/burn/Samples.
Typically the change you described would be made in a DetectComplete handler or a PlanBegin handler, but there are other options.
________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of erwin john publico <erwinjohnpublico at yahoo.com>
Sent: Wednesday, February 8, 2017 3:43:45 AM
To: WiX Toolset Users Mailing List
Subject: [wix-users] Change burn's ExePackage InstallCommand value conditionally
Hi All,
I have to change the arguments that I pass to an ExePackage during install depending on some conditions. I can pass arguments through InstallCommand attribute but how can I change the value I set there conditionally?
I tried adding a variable as the value in InstallCommand but there aren't available commands such as SetVariable that can change my variable's value conditionally. Is there a way to do this? Currently, What I ended up with is having the same ExePackage written but have different InstallCommand and different InstallCondition - which is not really neat looking.
Thanks,Erwin
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list