how detect if is installed JAVA JRE

Post Reply
Romeo
Posts: 328
Joined: Thu Jan 25, 2007 3:53 pm
Location: Milan (Italy)

how detect if is installed JAVA JRE

Post by Romeo »

Hi,
I installed the:
jre-6u1-windows-i586-p-s.exe

to run a myprogram.jar esternal to fwh

Now how to detect if the jre-6u1-windows-i586-p-s.exe is installed or not on pc ! (for my customer)

Is possible to check same resister key ?

tks
Romeo
Romeo
Posts: 328
Joined: Thu Jan 25, 2007 3:53 pm
Location: Milan (Italy)

Post by Romeo »

ok, i solved the problem using:
LOCAL HKEY_LOCAL_MACHINE:= 2147483650
LOCAL HKEY_CURRENT_USER := 2147483649
LOCAL KEY_ALL_ACCESS := 983103


LOCAL hKey := 0

LOCAL nType := 0

LOCAL cData := SPACE( 256 )

LOCAL nSize := LEN( cData )

REGOPENKEY( HKEY_LOCAL_MACHINE,"Software\JavaSoft\Java Runtime Environment", 0,KEY_ALL_ACCESS, @hKey )
REGQUERYVALUE( hKey, "CurrentVersion", 0, @nType, cData, @nSize)
REGCLOSEKEY( hKey )

_versione:=LEFT( cData, AT( CHR( 0 ), cData ) - 1 )

tks anyway
romeo
Post Reply