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

Bob Arnson bob at firegiant.com
Thu Jul 30 14:02:11 PDT 2020


In WiX v3, you're limited to the behavior that WixStdBA provides. In WiX v4, ThmUtil supports what you're looking for so you can do it directly in the theme file without needing "code-behind" in WixStdBA.

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Nikola Milosavljevic (CLR) via wix-users
Sent: Wednesday, 29 July, 2020 19:14
To: wix-users at lists.wixtoolset.org
Cc: Nikola Milosavljevic (CLR) <nikolam at microsoft.com>
Subject: [wix-users] How to disable controls in WixStdBA - based on Burn action, like uninstall

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


____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list