title: Wix bootstrapper won't detect installed .NET framework
body: <p>I have a Wix installer and bootstrapper application to install my application and a service. As a prerequisite I need the .NET 2.0 SP2 Framework installed and tried to detect that using the following codesnippet:</p>
  
  <pre><code>    &lt;Chain&gt;
        &lt;PackageGroupRef Id='Netfx2Package' /&gt;
        &lt;MsiPackage SourceFile="..\Wix.CHL7.Dispatcher.Service.AZHF\bin\Debug\Wix.CHL7.Dispatcher.Service.AZHF.msi" Id="Wix.CHL7.Dispatcher.Service.AZHF_PackageId" Cache="yes" Visible="no"&gt;
          &lt;MsiProperty Name="INSTALLDIR" Value="[INSTALLPATH]" /&gt;
          &lt;MsiProperty Name="WixAppFolder" Value="[INSTALLSCOPE]"/&gt;
  
        &lt;/MsiPackage&gt;
      &lt;/Chain&gt;
    &lt;/Bundle&gt;
  
    &lt;Fragment&gt;
      &lt;WixVariable Id="WixMbaPrereqPackageId" Value="Netfx2Package" /&gt;
      &lt;WixVariable Id="WixMbaPrereqLicenseUrl" Value="NetfxLicense.rtf" /&gt;      
  
      &lt;PackageGroup Id="Netfx2Package"&gt;
        &lt;ExePackage Id="Netfx2Exe"
                    Cache="no"
                    Compressed="no"
                    PerMachine="yes"
                    Permanent="yes"
                    Vital="yes"
                    SourceFile="C:\Installation\Wix.CHL7.Dispatcher.Service.Bootstrapper\lib\NetFx20SP2_x86.exe"
                    DownloadUrl="http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x86.exe"
                    DetectCondition="NETFRAMEWORK20"
                    InstallCondition="FALSE"/&gt;
      &lt;/PackageGroup&gt;
    &lt;/Fragment&gt;
  </code></pre>
  
  <p>When I run the installer on a machine which has .NET 2.0 SP2 installed (checked that in the registry) my installer wants to download and install the framework.</p>
  
  <p>I assume my DetectCondition is incorrect but can't seem to find a correct solution to my problem.
  So how do I detect if .NET 2.0 SP2 is installed in my bootstrapper?</p>
  
  <p>Thanks in advance!</p>
  
  <p>W</p>