Bundle.wxl:
<Bundle Name="$(var.SetupName)"
Version="$(var.ProductVersion)"
Manufacturer="$(var.CompanyName)"
UpgradeCode="$(var.UpgradeCode)">
<Variable bal:Overridable="yes" Name="AddLocal"/>
<Variable bal:Overridable="yes" Name="Remove"/>
<Chain>
<MsiPackage Id ="Hello.msi" Name="MyApp.msi" SourceFile="$(var.MyApp.TargetPath)" EnableFeatureSelection="yes" >
<MsiProperty Name="ADDLOCAL" Value="[AddLocal]"/>
<MsiProperty Name="REMOVE" Value="[Remove]"/>
</MsiPackage>
</Chain>
</Bundle>
String Variable AddLocal
defines by checkboxes from UI Bootstrapper and sends value to the Bundle.wxl like this:
BootstrapperApplication.Engine.StringVariables["AddLocal"] = "FIRST,SECOND";
The same situation with the Remove
variable:
BootstrapperApplication.Engine.StringVariables["Remove"] = "THIRD";
After variables are set I run BootstrapperApplication.Engine.Plan(LaunchAction.Modify);
but nothing is changed with my features.
Log file contains strings like this:
Planned feature: FIRST, state: Absent, default requested: Unknown, ba requested: Unknown, execute action: None, rollback action: None
Planned feature: SECOND, state: Absent, default requested: Unknown, ba requested: Unknown, execute action: None, rollback action: None
Planned feature: THIRD, state: Absent, default requested: Unknown, ba requested: Unknown, execute action: None, rollback action: None
However, Product.wxs contains features with id="FIRST", id="SECOND", id="THIRD".