|
|
#1 |
|
Junior Member
Join Date: Oct 2004
Posts: 5
|
hi all,
my question is simple. is it possible (and how) reading the registry in a loop... The needed is simple. Suppose that you want to see all the jdk installed in a system. Normally windows use this registry entry: HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit and under this key it put several key entries, depending from what you have installed: HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\1.4 HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\1.4.2_04 HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\1.4.2_05 so suppose that my application doesn't suppor jdk minor version 04 and support only 05 or highter. I'd like to let the user download the right jdk only if it's not istalled (see present) in the system. If someone istall 05 and after 04 the current version points to 04 but 05 is installed in the system, in this case i'd like to prevent a jdk download and point my class path and whatever where the right jdk is installed. thanks a lot |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
You can use this macro to check if a key exists:
http://nsis.sourceforge.net/archive/...b.php?page=364 -Stu |
|
|
|
|
|
#3 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
You can also use EnumRegKey, EnumRegValue and some integer comparisons for a more general solution.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Oct 2004
Posts: 5
|
thanks a lot.
I used the second solution + a script for version cheking (well i was able to add a couple of features for java). |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|