Ok, I found by trial and error option that works:
<Property Id="SQLSERVER">
<RegistrySearch Id="SQLServer" Root="HKLM" Key="SOFTWAREMicrosoftMicrosoft Sql Server" Type="raw" Name="InstalledInstances"/>
</Property>
I define a registry search, and then check its value:
<Condition Message="You don't have SQL Server installed.">
<![CDATA[SQLSERVER >< SQLEXPRESS]]>
</Condition>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…