I have a requirement where I need to detect all the installed versions of Java. I am writing a simple script to iterate over all the registry keys to detect the versions. The installer seems to be skipping over some keys and not returning the entire registry keys. Here is the piece that I have written:
When I print the values for the Registry Key above, it only shows the 1.8 & 1.8.0_60 and seems to skip over 1.7 & 1.7.0_79.
Unable to figure out what might be the issue here and need some help from the experts. Tried searching for over 3 days now and couldn't find any relevant information yet.
Note: This is my first NSIS script and so kind of lost.
I have the following Keys in the registry for that particular parent key:code:
ReadRegKey:
EnumRegKey $1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" $0
MessageBox MB_OK "Registry Key: $1"
IntOp $0 $0 + 1
StrCmp $1 "" ReadRegValue
Goto ReadRegKey
ReadRegValue:
1.7, 1.7.0_79, 1.8, 1.8.0_60
When I print the values for the Registry Key above, it only shows the 1.8 & 1.8.0_60 and seems to skip over 1.7 & 1.7.0_79.
Unable to figure out what might be the issue here and need some help from the experts. Tried searching for over 3 days now and couldn't find any relevant information yet.
Note: This is my first NSIS script and so kind of lost.
Comment