[wix-users] How to disable controls in WixStdBA - based on Burn action, like uninstall

Nikola Milosavljevic (CLR) nikolam at microsoft.com
Wed Jul 29 16:14:05 PDT 2020


Hi Wix experts,

Is it possible to condition visibility of a custom control in Standard bootstrapper application, based on burn action/operation? I.e. I would like to disable some controls during uninstall.

WixStdBa already does that for some predefined controls, i.e.: https://github.com/wixtoolset/wix3/blob/2ed6d7906c87bb65b75cfa0020e38a1b1dffa49b/src/ext/BalExtension/wixstdba/WixStandardBootstrapperApplication.cpp#L2570

Interestingly, there is a way to set a variable with "State" suffix to set the control visibility: https://github.com/wixtoolset/wix3/blob/2ed6d7906c87bb65b75cfa0020e38a1b1dffa49b/src/ext/BalExtension/wixstdba/WixStandardBootstrapperApplication.cpp#L2735

But, how can I define a variable that has value conditioned on Burn action?

Ideally I'd use something like this, but there is no Condition attribute on Variable element:

<Variable Name="MyTestControlState" Type="string" Value="disable" Condition="WixBundleAction=3" />

Thanks,
Nikola



More information about the wix-users mailing list