title: JRE installation condition does not work properly
body: <p>I have written an installer using wix. I try to check if JRE is installed on computer. Mostly works fine but some cases (some user machines) does not work properly and installation cannot complete successfully because wix cannot find JRE.</p>
  
  <p>JRE search and condition code:</p>
  
  <pre><code>&lt;Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"&gt;
  .....
  &lt;Product ...... &gt;
  .....
  &lt;Property Id="JREINSTALLED"&gt;
  &lt;RegistrySearch Id="JRE_CURRENT_VERSION_REGSEARCH" Root="HKLM" Key="SOFTWARE\JavaSoft\Java Runtime Environment" Name="CurrentVersion" Type="raw" Win64="no" /&gt;
  &lt;/Property&gt;
  &lt;Condition Message="Java Runtime Environment (32 Bit) is not installed. Please install Oracle JRE."&gt;&lt;![CDATA[(JREINSTALLED)]]&gt;&lt;/Condition&gt;
  ......
  &lt;/Product&gt;
  &lt;/Wix&gt;
  </code></pre>
  
  <p>MSI Log Releated to "JREINSTALLED":</p>
  
  <pre><code>.....
  AppSearch: Property: JREINSTALLED, Signature: JREINSTALLED_REGSEARCH
  .....
  PROPERTY CHANGE: Adding JREINSTALLED property. Its value is '1.8'.
  .....
  Switching to server: JREINSTALLED="1.8" INSTALLDIR="C:\Program Files (x86)\MyProgram\" TARGETDIR="D:\" PREVIOUSVERSIONSINSTALLED="{08636CF5-D7C4-42FD-85D8-ED21227632AE}" ALLUSERS="1" CURRENTDIRECTORY="C:\Users\dreamcatcher" CLIENTUILEVEL="0" CLIENTPROCESSID="3968" PRODUCTLANGUAGE="1055" USERNAME="menemine.cart" COMPANYNAME="SCCM06S01" SOURCEDIR="C:\Windows\ccmcache\d\" EXECUTEACTION="INSTALL" ACTION="INSTALL" ROOTDRIVE="D:\" INSTALLLEVEL="1" SECONDSEQUENCE="1"  ADDLOCAL=DefaultFeature  
  .....
  Command Line: JREINSTALLED=1.8 INSTALLDIR=C:\Program Files (x86)\MyProgram\ TARGETDIR=D:\ PREVIOUSVERSIONSINSTALLED={08636CF5-D7C4-42FD-85D8-ED21227632AE} ALLUSERS=1 CURRENTDIRECTORY=C:\Users\dreamcatcher CLIENTUILEVEL=0 CLIENTPROCESSID=3968 PRODUCTLANGUAGE=1055 USERNAME=dreamcatcher COMPANYNAME=SCCM06S01 SOURCEDIR=C:\Windows\ccmcache\d\ EXECUTEACTION=INSTALL ACTION=INSTALL ROOTDRIVE=D:\ INSTALLLEVEL=1 SECONDSEQUENCE=1 ADDLOCAL=DefaultFeature ACTION=INSTALL 
  .....
  Ignoring disallowed property JREINSTALLED
  .....
  Property(C): JREINSTALLED = 1.8
  </code></pre>
  
  <p>Also I check Registry records (HKLM\SOFTWARE\JavaSoft\Java Runtime Environment) and looks right. I cannot find any reason for cannot determine JRE. </p>
  
  <p>What am i missing?</p>