I want to install Java using an NSIS script, but i have to know whether Java is installed or not in the system (Windows). based on the register keys how can we check if Java is installed or not?
Can anybody provide an NSIS script to check Java installation based on registery keys?
The following fragment of code checks if Java is installed (jre or jdk). If Java is not installed, it will install it. The script also saves the path to Java in a variable
$JavaInstallationPath
.I think you can also put the above code in a function and call it wherever you like in your NSIS script.
I didn't compile it, but I would try following. I chose registry key based on How can I detect the installed Sun JRE on Windows?.
Another example with online jre installer and 64/32 bit check
java min version
check function
version compare
getJre
if theire is something missing you will find it at nsis-wiki page