[wix-devs] In burn verifying a prerequisite is installed during install but doesn't matter during uninstall...

Hoover, Jacob Jacob.Hoover at greenheck.com
Thu Oct 18 09:01:39 PDT 2018


Please try wix-users for usage questions.  Wix-devs is for the development of wix not the usage of it.

-----Original Message-----
From: wix-devs [mailto:wix-devs-bounces at lists.wixtoolset.org] On Behalf Of Edwin Castro via wix-devs
Sent: Thursday, October 18, 2018 10:46 AM
To: WiX Toolset Developer Mailing List <wix-devs at lists.wixtoolset.org>
Cc: Edwin Castro <egcastr at gmail.com>; Steve Ogilvie <sogilvie at msn.com>
Subject: Re: [wix-devs] In burn verifying a prerequisite is installed during install but doesn't matter during uninstall...

I defined the following

  <?define BootstrapperActionInstall = 4?>
  <?define BundleIsUninstalling = "(WixBundleAction < $(var.BootstrapperActionInstall))"?>

Then I use it as the first part of my condition (usually in DetectCondition
attributes)

$(var.BundleIsUninstalling) OR (Actual Condition Here...)

I'm guessing that in your case you may need

<bal:Condition Message="#(loc.ParentProductNotInstalled_Message)">
  <![CDATA[$(var.BundleIsUninstalling) OR (ISPARENTPRODUCTINSTALLED >= $(var.ParentProdcutVersion))]]> </bal:Condition>

If you are uninstalling, then the other condition doesn't matter.

--
Edwin G. Castro


On Thu, Oct 18, 2018 at 8:07 AM Steve Ogilvie via wix-devs < wix-devs at lists.wixtoolset.org> wrote:

>
>
> Hi folks,
>
> I am verifying that a prerequisite for our installer is already 
> installed (it is the parent product of what we are installing).
>
> It is working fine, during install, it detects whether or not the 
> product is installed.
> However, on uninstall if the parent product is not present the 
> installer won’t uninstall (which is not good), I have played around 
> trying to fix this and not having a good fix.
> I end up getting the installer failing on the condition that the 
> parent product is NOT installed (but on uninstall it doesn’t matter).
>
> So I need:
>
>   1.  On install make sure the parent product exists in order for us 
> to install
>   2.  On uninstall it doesn’t matter if parent product exists or not…
>
> Here is my code:
> <?define ParentProdcutVersion = v2.10.0.0 ?> <util:ProductSearch 
> Id="ISPARENTPRODUCTINSTALLED" UpgradeCode="{<the upgrade GUID of the 
> parent product}" Result="version"
> Variable="ISPARENTPRODUCTINSTALLED" />
>
> <!-- Check to make sure Parent product is installed -->
>   <bal:Condition Message="#(loc.ParentProductNotInstalled_Message)">
>     <![CDATA[NOT Installed AND (ISPARENTPRODUCTINSTALLED >= 
> $(var.ParentProdcutVersion))]]>
>   </bal:Condition>
>
> Any help would be appreciated.
>
> Thanks,
>
> Steve
>
> Steve Ogilvie
> Builds and Release
> ____________________________________________________________________
> WiX Toolset Developer Mailing List provided by FireGiant 
> http://www.firegiant.com/
>
____________________________________________________________________
WiX Toolset Developer Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-devs mailing list