PDA

View Full Version : jre detection


DEbln001
5th June 2008, 15:15
Hello everybody,
i might need some help again.

I need to read out all coexistent installed Java Runtime Environments (JRE) e.g. "1.4.2_11" "1.5.6_06" "1.5.6_09" "1.6.0_06". Any ideas how i could do this?

Thanks in advance
DEbln001

DEbln001
5th June 2008, 16:40
i solved it myself by using this:


loop:
EnumRegKey $1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" $0
StrCmp $1 "" done
StrLen $2 "$1"
${If} $2 > 3
${JREFoundArray->Push} "$1"
${EndIf}
IntOp $0 $0 + 1
Goto loop
done: