I want to detect JRE installation folder od target computer so that I can copy some files to it in my installation procedure.
So I add in search page new search task and set location to registry (to find out version of Java installed on target computer):
root: HKEY_LOCAL_MACHINE
key: SOFTWARE\JavaSoft\Java Runtime Environment
name: BrowserJavaVersion
type: Retrieve the raw value
I tested it and retrieve correct result: 1.6.0_06 which is saved in user defined property named BROWSER_JAVA_VERSION
Than I add new search task and set location to registry (to find out path to Java installation on target computer, i.e. "java.home"):
root: HKEY_LOCAL_MACHINE
key: SOFTWARE\JavaSoft\Java Runtime Environment\[BROWSER_JAVA_VERSION]
name: JavaHome
type: The value contains path to a directory
When this is tested no result is retrieved.
I suppose problem is in user defined property BROWSER_JAVA_VERSION because when I set key to SOFTWARE\JavaSoft\Java Runtime Environment\1.6.0_06
correct result is retrieved when tested: C:\Sun\JRE\jre1.6.0_06\
Where is the problem, any suggestions!?
I need to dynamically detect latest java version and corresponding path from registry.
Thanks in advance!
FOLLOW US
Get the latest news in Application Packaging