I am trying to read the version of JRE (Java Runtime Environment) on a machine using the following code:
RegDBSetDefaultRoot( HKEY_LOCAL_MACHINE );
RegDBGetKeyValueEx( "Software//JavaSoft//Java Runtime Environment","CurrentVersion", nvType, szVersionString, nvSize);
switch (nvType)
case REGDB_STRING:
MessageBox("REGDB_STRING",INFORMATION);
case REGDB_STRING_EXPAND:
MessageBox("REGDB_STRING_EXPAND",INFORMATION);
case REGDB_STRING_MULTI:
MessageBox("REGDB_STRING_MULTI",INFORMATION);
case REGDB_NUMBER:
MessageBox("REGDB_NUMBER",INFORMATION);
case REGDB_BINARY:
MessageBox("REGDB_BINARY",INFORMATION);
default:
MessageBox("Other",INFORMATION);
endswitch;
/* Assign a value to IFX_INSTALLED_VERSION. */
MessageBox("Version of JRE on your machine is ", INFORMATION);
MessageBox(szVersionString, INFORMATION);
When I try to run on my machine(Win XP), the szVersionString is returning null. But when I see the registry, there is a value for "Current Version" of "1.5" and the data type is REG_SZ. My confusion is when I read the documentation, I don't see Installshield fn RegDBGetKeyValueEx returning REG_SZ datatype at all. What mistake am I doing?
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Problem while facing a registry key
Started by
new2is
, Jun 20 2006 04:40
1 reply to this topic