I am new to Wix and this is what I am trying to do. I need to throw a message if I detect the same application is already installed. I want to find that out using its registry entry
This is the code I wrote
<Property Id="INSTALLEDHREC" Secure="yes">
<RegistrySearch Id="HRECVERSION" Root="HKLM" Key="SOFTWARECOMPANYPRODUCT" Name="Version" Type="raw" Win64="yes" />
</Property>
<Condition Message="Please uninstall first"><![CDATA[INSTALLEDHREC = "1.11.0"]]></Condition>
The installer log shows
AppSearch: Property: INSTALLEDHREC, Signature: HRECVERSION
MSI (c) (58:18) [14:31:44:467]: Note: 1: 2262 2: Signature 3: -2147287038
MSI (c) (58:18) [14:31:44:467]: PROPERTY CHANGE: Adding INSTALLEDHREC property. Its value is '1.11.0'.
But I am not seeing the pop-up message.
I tried different conditions
<![CDATA[Installed AND INSTALLEDHREC]]>
pop-up message comes always (already installed / not installed)
<![CDATA[Installed AND INSTALLEDHREC << "1"]]>
pop-up message comes always (already installed / not installed)
<![CDATA[Installed OR INSTALLEDHREC]]>
pop-up message never comes (already installed / not installed)
<![CDATA[Installed OR INSTALLEDHREC << "1"]]>
pop-up message never comes (already installed / not installed)
And in all the above cases, the installer log shows the same lines. Is there anything that I am missing..?
<![CDATA[Not INSTALLEDHREC]]>
The above resolved my issue. I faced the issue because basically I misinterpreted the documentation mentioned in https://wixtoolset.org/docs/v3/howtos/redistributables_and_install_checks/block_install_on_os/