One of the conditions for running my installer is that a value in the registry should be different from "1", otherwise it would display an error message and quit.
This can't be done through custom actions since even the OnBeforeInstall
event happens after install, so the user could terminate the setup before the rollback.
If I was using WiX it would be simples as
<Condition Message="This application cannot be installed with SOMESOFTWARE v1. Setup now will exit.">
<![CDATA[SOMESOFTWAREVERSION <> "#1"]]>
</Condition>
<Property Id="SOMESOFTWAREVERSION">
<RegistrySearch Id="SomeSoftwareVersion"
Root="HKLM"
Key="SOFTWARE\Some Manufacturer\SomeSoftware"
Name="SomeSoftwareVersion"
Type="raw" />
</Property>
How can I do the same without WiX?