We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

a.guelle
Posts: 98
Joined: Tue May 19, 2015 2:23 pm

[solved] Registry Subkey not shown in search

Hi Folks,

I am trying to get the path of a Java JDK installation from the registry to set the JAVA_HOME environment variable. The JDK is 64Bit and I checked "Search the 64-bit porion of the registry". The correct 64bit tree was chosen however the Key Selecter does not go beyond a specific key

Code: Select all

HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit
Though there is a subkey

Code: Select all

HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\1.7
Even putting the registry path by hand does not produce a result when running the test.
So how can I get the value of

Code: Select all

HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\1.7\
"JavaHome"
?
Attachments
RegEdit.PNG
RegEdit.PNG (49.87 KiB) Viewed 7530 times
RegSelectAI.PNG
RegSelectAI.PNG (42.09 KiB) Viewed 7530 times
Last edited by a.guelle on Wed Aug 10, 2016 12:47 pm, edited 1 time in total.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Registry Subkey not shown in search

Hello and welcome to Advanced Installer forums,

Indeed, the registry picker does not display all keys. A fix will be available in a future version of Advanced Installer, thank you for bringing it to our attention.

However, adding manually the path in the Registry Location Properties fixed the problem. Please take a look on the bellow image and make sure you have the same settings:
JavaHome - SearchResult.png
JavaHome - SearchResult.png (25.42 KiB) Viewed 7488 times
Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
a.guelle
Posts: 98
Joined: Tue May 19, 2015 2:23 pm

Re: Registry Subkey not shown in search

Hi Dan,

thank you for our reply. The manual search works but returns a wrong value. I guess your search is also wrong. Searching the 64bit tree should NOT give a value in the folder:

Code: Select all

C:\Program Files (x86)\
Cheers, Angelo
Attachments
manualRegSearch.PNG
manualRegSearch.PNG (86.84 KiB) Viewed 7480 times
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Registry Subkey not shown in search

Hello,

This is the Windows Installer normal behavior.
For details you can take a look on the Search Registry does not return Raw Value and copy file path force x86 threads which debate a similar problem.

If there is anything else I can help you with, please let me know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
a.guelle
Posts: 98
Joined: Tue May 19, 2015 2:23 pm

Re: Registry Subkey not shown in search

Hey Dan,

both solutions do not work for me. Seems I will just have to script my desired behaviour on my own (And am again not able to use the Advanced Installer inbound feature).

Thanks so far,

Angelo
a.guelle
Posts: 98
Joined: Tue May 19, 2015 2:23 pm

Re: Registry Subkey not shown in search

So for everyone who is interested, here is the solution:

Set a new property on the "Install Parameters" page. (In my case JAVA_HOME_PROP)
Create a custom "Execute inline script code" action (http://www.advancedinstaller.com/user-g ... ipt-inline) that fetches the registry key and sets the value to your newly created property. Make sure to set the Execution Time to "Immediately" and run it as 64-Bit script.

Code: Select all

Set wso = CreateObject("Wscript.Shell")
Dim java_home
java_home = wso.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\1.7\JavaHome")
Session.Property("JAVA_HOME_PROP") = java_home
Add a new Environment Variable "JAVA_HOME" on the "Environment" page and set [JAVA_HOME_PROP] as value.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: [solved] Registry Subkey not shown in search

Hello,

This was fixed in version 14.3 of Advanced Installer released on September 18th, 2017.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”