JRE安装条件无法正常工作

时间:2018-05-24 07:48:06

标签: wix windows-installer

我使用wix编写了一个安装程序。我尝试检查计算机上是否安装了JRE。大多数工作正常,但有些情况(某些用户机器)无法正常工作,安装无法成功完成,因为wix无法找到JRE。

JRE搜索和条件代码:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
.....
<Product ...... >
.....
<Property Id="JREINSTALLED">
<RegistrySearch Id="JRE_CURRENT_VERSION_REGSEARCH" Root="HKLM" Key="SOFTWARE\JavaSoft\Java Runtime Environment" Name="CurrentVersion" Type="raw" Win64="no" />
</Property>
<Condition Message="Java Runtime Environment (32 Bit) is not installed. Please install Oracle JRE."><![CDATA[(JREINSTALLED)]]></Condition>
......
</Product>
</Wix>

MSI日志发布为“JREINSTALLED”:

.....
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

我还检查了注册表记录(HKLM \ SOFTWARE \ JavaSoft \ Java运行时环境)并且看起来正确。我找不到任何无法确定JRE的理由。

我缺少什么?

0 个答案:

没有答案