[wix-users] Conditions appearing on the Welcome UI dialog...
Lewis Henderson
henderso at opentext.com
Wed Apr 13 09:35:07 PDT 2016
Hi Everyone,
I've got a weird situation - it's not a show-stopper, but it is an annoyance. I've got a set of property searches and settings to verify that an appropriate Java is installed, but as a result, some of these condition checks appear briefly on the Welcome Dialog before things settle in.
Here's the include I use to check for Java:
<?xml version="1.0" encoding="UTF-8"?>
<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Property Id="JRE_VERSION" Secure="yes">
<RegistrySearch Id="jre_ver" Root="HKLM"
Key="Software\JavaSoft\Java Runtime Environment"
Name="CurrentVersion" Type="raw" />
</Property>
<Property Id="JRE_HOME" Secure="yes">
<RegistrySearch Id="jre_home" Root="HKLM"
Key="Software\JavaSoft\Java Runtime Environment\[JRE_VERSION]"
Name="JavaHome" Type="raw" />
</Property>
<Property Id="JRE_JVM" Secure="yes">
<DirectorySearch Id="jre_jvm" Path="[JRE_HOME]\bin" Depth="1">
<FileSearch Name="jvm.dll" />
</DirectorySearch>
</Property>
<Property Id="JDK_VERSION" Secure="yes">
<RegistrySearch Id="jdk_ver" Root="HKLM"
Key="Software\JavaSoft\Java Development Kit"
Name="CurrentVersion" Type="raw" />
</Property>
<Property Id="JDK_HOME" Secure="yes">
<RegistrySearch Id="jdk_home" Root="HKLM"
Key="Software\JavaSoft\Java Development Kit\[JDK_VERSION]"
Name="JavaHome" Type="raw" />
</Property>
<Property Id="JDK_JVM" Secure="yes">
<DirectorySearch Id="jdk_jvm" Path="[JDK_HOME]" Depth="3">
<FileSearch Name="jvm.dll" />
</DirectorySearch>
</Property>
<Property Id="JavaMinVersion" Value="$(var.JavaMinVersion)" />
<!-- All of this testing makes sure that:
1) we get at least the minimum java version
2) we get JAVA_HOME and JVM_PATH from the same place
3) we take the JRE value over the JDK if both exist -->
<SetProperty Id="JAVA_HOME" Value="[JRE_HOME]"
After="AppSearch">JRE_JVM AND JRE_VERSION >= "$(var.JavaMinVersion)"</SetProperty>
<SetProperty Id="JAVA_HOME" Value="[JDK_HOME]" Action="SetJAVA_HOME2"
After="AppSearch">NOT JAVA_HOME AND (JDK_JVM AND JDK_VERSION >= "$(var.JavaMinVersion)")</SetProperty>
<SetProperty Id="JAVA_HOME" Value="[JRE_HOME]" Action="SetJAVA_HOME3"
After="AppSearch">NOT JAVA_HOME AND (JRE_HOME AND JRE_VERSION >= "$(var.JavaMinVersion)")</SetProperty>
<SetProperty Id="JAVA_HOME" Value="[JDK_HOME]" Action="SetJAVA_HOME4"
After="AppSearch">NOT JAVA_HOME AND (JDK_HOME AND JDK_VERSION >= "$(var.JavaMinVersion)")</SetProperty>
<SetProperty Id="JVM_PATH" Value="[JRE_JVM]"
After="AppSearch">JRE_JVM AND JRE_VERSION >= "$(var.JavaMinVersion)"</SetProperty>
<SetProperty Id="JVM_PATH" Value="[JDK_JVM]" Action="SetJVM_PATH2"
After="AppSearch">NOT JVM_PATH AND (JDK_JVM AND JDK_VERSION >= "$(var.JavaMinVersion)")</SetProperty>
<Condition Message="!(loc.JavaRequiredStr)">
JRE_VERSION OR JDK_VERSION
</Condition>
<Condition Message="!(loc.JavaMinimumStr)">
JAVA_HOME
</Condition>
<Condition Message="!(loc.JvmRequiredStr)">
JVM_PATH
</Condition>
</Include>
So, does anyone have any ideas of why these may be showing up on the Welcome dialog? I suspect it may have to do with the timing of the SetProperty statements (After="AppSearch"), and if so, is there a better place to schedule them that still works and won't show up during the install?
Thanks for the help.
Lewis Henderson
More information about the wix-users
mailing list