FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour how detect if is installed JAVA JRE
Posts: 340
Joined: Thu Jan 25, 2007 03:53 PM
how detect if is installed JAVA JRE
Posted: Fri May 18, 2007 06:11 PM

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

Posts: 340
Joined: Thu Jan 25, 2007 03:53 PM
how detect if is installed JAVA JRE
Posted: Tue May 22, 2007 09:37 AM

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

Continue the discussion