Question

I am creating a bootsrapper for outlook addin using wix. I have to check outlook registry search only at the time of installation. My checks below are working fine at the time of installation. But after my addin installation, when somebody un-install outlook and then try to un-install my add-in this registry serch checks run at un-installation also and that cause blocking of uninstaller. I have to run these outlook registry search check only at time of installation. My checks are given below:

<util:RegistrySearch  Variable="Outlook2013Present" Root="HKLM" Key="SOFTWARE\Microsoft\Office\15.0\Outlook\InstallRoot"   Value="Path" />
<util:RegistrySearch  Variable="Outlook2013Present64" Root="HKLM" Key="SOFTWARE\Microsoft\Office\15.0\Outlook\InstallRoot"   Value="Path" Win64="yes" />

<bal:Condition Message="This setup requires Outlook 2010 or 2013. Please install office and then run installer again ">
  Outlook2010Present OR Outlook2010Present64 OR Outlook2013Present OR Outlook2013Present64
</bal:Condition>
Was it helpful?

Solution

According to documentation Wix Toolset Documentation WixBundleAction is a BOOTSTRAPPER_ACTION that is available in Wix Bootstrapper.

And as answered here: Wix Installer Forum I think you can try something like this:

<bal:Condition Message="This setup requires Outlook 2010 or 2013. Please install office and then run installer again ">

      (Outlook2010Present OR Outlook2010Present64 OR Outlook2013Present OR Outlook2013Present64 ) OR WixBundleAction = 3

</bal:Condition>

By having WixBundleAction = 3 inside condition clause, the condition will only be true for installation, and will be ignored during uninstall.

Hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top