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

Nikola Milosavljevic (CLR) nikolam at microsoft.com
Thu Jul 30 14:25:08 PDT 2020


Thanks Bob. I noticed that v4 has the support - we can't move to it just yet.

-----Original Message-----
From: Bob Arnson <bob at firegiant.com> 
Sent: Thursday, July 30, 2020 2:02 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Nikola Milosavljevic (CLR) <nikolam at microsoft.com>
Subject: [EXTERNAL] RE: How to disable controls in WixStdBA - based on Burn action, like uninstall

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://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fwixtoolset%2Fwix3%2Fblob%2F2ed6d7906c87bb65b75cfa0020e38a1b1dffa49b%2Fsrc%2Fext%2FBalExtension%2Fwixstdba%2FWixStandardBootstrapperApplication.cpp%23L2570&data=02%7C01%7Cnikolam%40microsoft.com%7Ca851a863477b4364ace608d834cbd559%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637317397348768056&sdata=ZSqPKq2zY%2F28IsVplkgjtroGhZPy64%2B28CiQE%2BL9Kv0%3D&reserved=0

Interestingly, there is a way to set a variable with "State" suffix to set the control visibility: https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fwixtoolset%2Fwix3%2Fblob%2F2ed6d7906c87bb65b75cfa0020e38a1b1dffa49b%2Fsrc%2Fext%2FBalExtension%2Fwixstdba%2FWixStandardBootstrapperApplication.cpp%23L2735&data=02%7C01%7Cnikolam%40microsoft.com%7Ca851a863477b4364ace608d834cbd559%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637317397348768056&sdata=6qYoQd%2F%2FSfvnU7ayxbIWvUcnXHB9A94XGuMnRxhpYkg%3D&reserved=0

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 https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.firegiant.com%2F&data=02%7C01%7Cnikolam%40microsoft.com%7Ca851a863477b4364ace608d834cbd559%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637317397348768056&sdata=YTZNHpyNdwtoI%2FtFLv37Admf6IsHYuyFfkJ%2BDdzxSdI%3D&reserved=0



More information about the wix-users mailing list