I have got a requirement to collect JRE information from HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment registry path but the problem currently I see is that version will keep on changing once JRE is upgraded (1.8.0_162 and post-upgrade 1.8.0_311). How can we collect Full Version, Installdir and Product Version details using relevance.
You can do that dynamically by checking for keys of key "X", to check all of they keys beneath the Java Runtime Environment key…
(values "FullVersion" of it as string, values "INSTALLDIR" of it as string, values "PRODUCTVERSION" of it as string) of keys of keys "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment" of native registry
(values "FullVersion" of it as string, values "INSTALLDIR" of it as string, values "PRODUCTVERSION" of it as string) of keys "MSI" of keys of keys "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment" of native registry