For Java I would suggest checking the registry key
"HKLM\SOFTWARE\JavaSoft\Java Runtime Environment\CurrentVersion". I have
had trouble checking the upgradecode as they sometimes install
side-by-side. 

Also, don't forget that this is an install for 32 bit and 64 bit and
therefore different registry keys for each version.

Neil

-----Original Message-----
From: Thom Leigh [mailto:t...@mondago.com] 
Sent: 12 January 2011 14:31
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Java check

As this is a pre-requisite I'm glad you're plan is to block the install
from the MSI with a meaningful error message if Java isn't installed.
That is definitely the right thing to do.

Fortunately the Java installer is MSI based (or at least the one
installed on my PC is), so detecting it from your WIX MSI is going to be
fairly easy.

One way to search for it could be to use a ComponentSearch. But better I
think, is to use FindRelatedProducts and search for Java's upgrade code
(I assume this would only change when a new major version comes out,
like from 1.5 to 1.6). Something like:

<Upgrade Id="{JAVA'S-UPGRADE-CODE}"
  <Property Id="JAVAISINSTALLED" Value="1" /> </Upgrade> <Condition
Message="Java isn't installed. Get it from Oracle and try again">NOT
JAVAISINSTALLED</Condition>

(Don't forget to schedule FindRelatedProducts in your InstallExecute and
InstallUI sequences if you haven't already)

-Thom


-----Original Message-----
From: Leonidas Spyropoulos [mailto:leonidas.spyropou...@formicary.net]
Sent: 12 January 2011 13:11
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Java check

Hey all,

Is there a way to check if Java is installed while installation?
Also what kind of versions and if not is it possible to ask the user to
download & install?

Thanks,
Leonidas


--
Leonidas Spyropoulos
Formicary - delivering quality financial technology solutions
www.formicary.net o : +44 (0)20 7920 7100

------------------------------------------------------------------------
----
This message is confidential and may be privileged. It is intended
solely for the named addressee. If you are not the intended recipient,
please inform us.
Any unauthorised dissemination, distribution or copying hereof is
prohibited.

Formicary Limited registered office in England and Wales, address 1
Taillar Road, Hedon, East Yorkshire HU12 8GU, registration number
3894343, VAT number 747644304, does not guarantee that the integrity of
this communication has been maintained nor that this communication is
free of viruses, interceptions or interference.
------------------------------------------------------------------------
----

------------------------------------------------------------------------
------
Protect Your Site and Customers from Malware Attacks Learn about various
malware tactics and how to avoid them. Understand malware threats, the
impact they can have on your business, and how you can protect your
company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------
------
Protect Your Site and Customers from Malware Attacks Learn about various
malware tactics and how to avoid them. Understand malware threats, the
impact they can have on your business, and how you can protect your
company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to