cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
response2shyam
Level 2

HOW to Validate with JRE JAVA RUNTIME ENVIRONMENT

HI
ALL

I am new to Installshield , i am using macrovision Installshield 2008

can any one plese let me know that how i have to authintace the system that JRE 1.6 or higher is installed on machine

as i tried with Registry
HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\CurrentVersion

but i am not able to check for JRE condition through
1.Create Customer sofware condition
2.CHECK FOR REGISTRY
3.I am STUCK IN CONDITION BUILDER



so please any one let me know whats the sysntax to check for JRE Version

as well as also let me know if i want to create my own install script then where i have to writ script ?
Labels (1)
0 Kudos
(4) Replies
RobertDickau
Flexera Alumni

If you look in the Redistributables view, there is a Java run-time prerequisite you can add to your project; it contains a condition that might suit your needs...
0 Kudos
response2shyam
Level 2

Hi Robert.
thank you so much. I sincerely appreciate your generosity,

I allready done that thing created new Prereqestor for JRE 1.6,
and done all the steps problem is just , i want to check that if the Machine has higher version then 1.6 , it that time it shoud have to skip the installation of JRE 1.6 but
i am not able to check the version with < opertator

i tried with these also in condition Buider
CURRENT_VERSION > 1.6
CURRENT_VERSION > “1.6”
CURRENT_VERSION > ‘1.6’

so can u please explain me in details , what i have to write as conditon in .prq (prerequstor) file.
0 Kudos
RobertDickau
Flexera Alumni

Please see, for example, the Prerequisite Condition details for the existing Java prerequisite, which has a similar condition set up, and which you can modify...
0 Kudos
torcomp-studica
Level 2

Here's a snippet I've been using for some time now, hope it helps;

prototype Get_JRE_Folder(BYREF STRING) ;


function Get_JRE_Folder( JRE_dir)
NUMBER nResult,nSetupType,nRootKey, keyType,nvSize;
STRING keyString, JRE_Version;
begin

RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);

nRootKey = HKEY_LOCAL_MACHINE;
if (RegDBSetDefaultRoot(nRootKey) < 0) then
MessageBox("First call to RegDBSetDefaultRoot failed: Error in Line 101", SEVERE);
return -1;
endif;

keyType= REGDB_STRING_EXPAND;
//Try to find the Java RunTime first
if (RegDBGetKeyValueEx ( "\\SOFTWARE\\JavaSoft\\Java Runtime Environment", "CurrentVersion",keyType, JRE_Version, nvSize) < 0 ) then
//NO JRE FOUND

// MessageBox("Could not detect Java Runtime Environment, will now launch JRE Installation", WARNING);
return -1;

else
keyType= REGDB_STRING_EXPAND;

//Found JRE
if (RegDBGetKeyValueEx ( "\\SOFTWARE\\JavaSoft\\Java Runtime Environment\\"+JRE_Version, "JavaHome",keyType, keyString, nvSize) < 0 ) then
//MessageBox("Could not detect JavaSoft JRE: RegDBGetKeyValueEx", WARNING);
return -1;

else
MessageBox("JavaSoft JRE has been found.",INFORMATION);
JRE_dir = keyString;
return 0;
endif;
return -1;

endif;

end;
0 Kudos