how detect if is installed JAVA JRE

how detect if is installed JAVA JRE

Postby Romeo » Fri May 18, 2007 6: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
Romeo
 
Posts: 340
Joined: Thu Jan 25, 2007 3:53 pm
Location: Milan (Italy)

Postby Romeo » Tue May 22, 2007 9: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
Romeo
 
Posts: 340
Joined: Thu Jan 25, 2007 3:53 pm
Location: Milan (Italy)


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 38 guests