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

Edwin Castro egcastr at gmail.com
Thu Oct 18 08:46:00 PDT 2018


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/
>



More information about the wix-devs mailing list