title: How to check for Crystal Reports for .NET Framework 4.0 installation in WiX
body: <p>I am creating a WiX Installer and need to check if a specific version of Crystal Reports for .NET Framework 4.0 (v. 13.0.3) is installed.  </p>
  
  <p>I have found two ways that both seem to work (on my W7 machine), but am not sure if one or the other has any downfalls such as working on XP etc.</p>
  
  <p>Option 1 (My concern with this option is if a later version is installed with a different product code, this condition will not pass):</p>
  
  <pre><code>&lt;Property Id="CRVSINSTALLED"&gt;
    &lt;RegistrySearch Id="CRVSInstalledSearch" Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\{AAD476D7-FC64-40BC-85EA-0C1FD98D8375}" Name="InstallDate" Type="raw" /&gt;
  &lt;/Property&gt;
  &lt;Condition Message="You don't have Crystal Reports for Visual Studio 2010 (v. 13.0.3)  installed."&gt;
    &lt;![CDATA[CRVSINSTALLED]]&gt;
  &lt;/Condition&gt;
  </code></pre>
  
  <p>Option 2:</p>
  
  <pre><code>&lt;Property Id="CRVSINSTALLED2"&gt;
    &lt;RegistrySearch Id="CRVSInstalledSearch2" Root="HKLM" Key="Software\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports" Name="CRRuntime32Version" Type="raw" /&gt;
  &lt;/Property&gt;
  &lt;Condition Message="You don't have Crystal Reports for Visual Studio 2010 (v. 13.0.3)  installed 2."&gt;
    &lt;![CDATA[CRVSINSTALLED2 &gt;= "13.0.3"]]&gt;
  &lt;/Condition&gt;
  </code></pre>