java - WIX - MSI: How to check highest version of jre 1.7 - till 1.6 from multiple version of JRE (1,8, 1.7.0_80, 1.7.0_79 and 1.6.0_45) in the system -


how can check highest version of 1.7 jre installed in system using wix? 1) application works 1.6 or 1.7 of jre's. 2) during msi installation need find our highest version of 1.7 or 1.6. a) if in system has installed 1.8.0_45, 1.7.0_80, 1.7.0_79 , 1.6.0_45. in case have find out 1.7.0_80 , need installed path.

as know below way can find out highest version of java installed in system.

 <property id="jre_64">         <registrysearch id="jre_64r" root="hklm"    key="software\javasoft\java runtime environment" name="currentversion"    type="raw" win64="yes"  />   </property>  

based on value checking 1.8 of java, need 1.7

<?if [jre_64] < 1.6 ,  [jre_64] >= 1.8 ?>          <property id="jre_64_7">             <registrysearch id="jre_64r_7" root="hklm" key="software\javasoft\java runtime environment" name="java7familyversion" type="raw" win64="yes"  />         </property>          <?if ([jre_64_7]  >= 1.7  ,  [jre_64_7] < 1.8) ?>             <property id="jre_64_6">                 <registrysearch id="jre_64r_6" root="hklm" key="software\javasoft\java runtime environment" name="java6familyversion" type="raw" win64="yes"  />             </property>          <?endif?>     <?endif?> 

but if condition not working property value comparison? how can solve it? suggestion please.

try custom action, include vbs binary try use wmi object , fetch properties of java family

set objwmiservice = getobject("winmgmts:{impersonationlevel=impersonate}!\\.\root\cimv2")  set allprods= objwmiservice.execquery("select name,vendor,version win32_product") 

iterate through allprods, if name java check version

sample response

version=6.0.100

vendor=sun microsystems, inc.

name=java(tm) 6 update 10


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -