Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check wix Bootstrapper RegistrySearch bal:Condition only at time of installation

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>
like image 322
Wahaj Ahmed Ansari Avatar asked Oct 21 '22 23:10

Wahaj Ahmed Ansari


1 Answers

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.

like image 87
AUR Avatar answered Oct 24 '22 04:10

AUR