|
From: Rob M. <ro...@fi...> - 2014-07-30 20:32:27
|
Don't use variables. Process the PlanPackageBegin event and tell the engine the state of the package.
-----Original Message-----
From: linos [mailto:li...@ho...]
Sent: Wednesday, July 30, 2014 13:24
To: wix...@li...
Subject: [WiX-users] Passing Variables from C# custom BA to WIX
I'm currently learning how to implement custom BA's through WIX and happen to run into a road block. I've created a custom GUI through WPF and need pass back to the WIX bootstrapper app, variables that I set in the C# application.
Here is my C# function that calls the Bootstrapper app private void InstallAExecute()
{
IsThinking = true;
Bootstrapper.Engine.StringVariables["AToInstall"] = "A";
Bootstrapper.Engine.Plan(LaunchAction.Install);
}
and in my Boostrapper app, I have the following element <Variable Name ="AToInstall" bal:Overridable="yes" Value="A" Type="string"/> declared above my BootstrapperApplicationRef element.
Then in my element Chain, I would like to add a conditional to trigger a particular msi to be installed when the variable satisfies the condition.
This is what I have in my chain, but I think my syntax is incorrect.
<Chain>
<PackageGroupRef Id='Netfx4Full' />
<MsiPackage SourceFile="..\Path\To\Installer.msi"
Id="InstallationPackageId" Cache="yes" Visible="no" InstallCondition ="AToInstall=A"/>
</Chain>
Any idea where I went wrong?
--
View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Passing-Variables-from-C-custom-BA-to-WIX-tp7596113.html
Sent from the wix-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX...@li...
https://lists.sourceforge.net/lists/listinfo/wix-users
|