I'm trying to add a check in my installer, so that if a specific registry key is not present it has to fail. That's roughly what I'm doing:
<Property Id="REGVALUE">
<RegistrySearch Id="regval" Root="HKLM" Key="SOFTWARE\Foo" Type="raw"/>
</Property>
<Condition Message="Valid Foo value not present. Found [REGVALUE]">
<![CDATA[REGVALUE = "Bar" OR REMOVE ~= "ALL"]]>
</Condition>
The problem I'm having is that this condition always fail. I tried querying different registry keys and no matter what I try, I always get a blank value. In the install log I can't see any access to the registry, nor any error related to the registry. So I'm a bit lost. Am I missing something obvious?