Cool, I think we'll go with this approach. Comparing what's in my registry with what seems to be going on below and since I have no experience with registry searches or ExePackages, I have some questions:
1) The Java version seems to be the value HKLM\SOFTWARE\JavaSoft\Java Runtime Environment\Java7FamilyVersion, which seems to be what Java7FamilyVersion fetches. However, why doesn't WiX ever compare Java7FamilyVersion with what's supposed to be the correct value (i.e. 1.7.0_21)? 2) Since Java7FamilyVersion already seems to get the version, what's the point of doing the second registry search (i.e. "JavaProductVersion")? 3) In my registry, the JavaProductVersion looks like it would fetch "7.0.210", which would always result in the condition "JavaProductVersion >= v7.0.210" being FALSE, no? (Since "7.0.210" != "v7.0.210") 4) What is/should be "[WixBundleLog_Java7Runtime]"? Alain -----Original Message----- From: Neil Sleightholm [mailto:n...@x2systems.com] Sent: May 30, 2013 04:55 To: afor...@cmu.edu; General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Download and install Java This is what I do, it doesn't do the download as I prefer to embed the file but that shouldn't be too hard to add: <Fragment> <util:RegistrySearch Id="Java7FamilyVersion" Root="HKLM" Key="SOFTWARE\JavaSoft\Java Runtime Environment" Value="Java7FamilyVersion" Variable="Java7FamilyVersion" /> <util:RegistrySearch Root="HKLM" Key="SOFTWARE\JavaSoft\Java Runtime Environment\[Java7FamilyVersion]\MSI" Value="PRODUCTVERSION" Variable="JavaProductVersion" After="Java7FamilyVersion" Condition="Java7FamilyVersion" /> <PackageGroup Id="Java7Runtime"> <ExePackage Id="Java7Runtime" DisplayName="Java Runtime Version 7" Cache="no" Compressed="yes" PerMachine="yes" Permanent="yes" Vital="yes" Name="Redist\jre-7u21-windows-i586.exe" SourceFile="..\Packages\jre-7u21-windows-i586.exe" InstallCommand="/s ADDLOCAL=jrecore IEXPLORER=1 MOZILLA=1 JAVAUPDATE=0 JU=0 SYSTRAY=0 AUTOUPDATECHECK=0 REBOOT=Suppress /L*v "[WixBundleLog_Java7Runtime]"" DetectCondition="Java7FamilyVersion AND (JavaProductVersion >= v7.0.210)"> </ExePackage> </PackageGroup> </Fragment> Neil >Hi all, > >Surely this has been done by someone, but I haven't found anything >definitive on it so far. > >I'd like our installer to check that Java is installed (preferably 6 or >7), and if it isn't, then download and install it. We want it to be as >seamless as possible to make life as easy for the user as possible. > >Worst case scenario, I suppose we could always direct the user to the >java website and ask the user to start our installer again once Java's >installed. But I'm wondering if it's possible to do any better. > >Any thoughts? > >Alain > >*************************************** >Alain Forget, Ph.D. >Postdoctoral Researcher >CyLab, Carnegie Mellon University >afor...@cmu.edu >http://cups.cs.cmu.edu/~aforget/ >*************************************** > > > > >----------------------------------------------------------------------- >--- >---- >Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET >Get 100% visibility into your production application - at no cost. >Code-level diagnostics for performance bottlenecks with <2% overhead >Download for free and get started troubleshooting in minutes. >http://p.sf.net/sfu/appdyn_d2d_ap1 >_______________________________________________ >WiX-users mailing list >WiX-users@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get 100% visibility into your production application - at no cost. Code-level diagnostics for performance bottlenecks with <2% overhead Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap1 _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users