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!

denvercoder
Posts: 2
Joined: Mon Jan 04, 2016 11:31 pm

Finding location of JDK

Hi All,

Is there a way using advanced installer to find the location of the JDK on the machine (ex. C:\Program Files\Java\jdk1.8.0_45)? It doesn't seem to be a built-in property.

Thanks!
denvercoder
Posts: 2
Joined: Mon Jan 04, 2016 11:31 pm

Re: Finding location of JDK

I found what I want in the registry at (HKLM\Software\JavaSoft\Java Development Kit\1.8\JavaHome) which exists, but when I go to test it, I don't get back any results. I've tried the same for some other registry entries and also am not getting any results. Any ideas?

Settings:
Root: HKEY_LOCAL_MACHINE
Key: Software\JavaSoft\Java Development Kit\1.8\JavaHome
type/64 i've tried all the options for these.

Thanks!
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Finding location of JDK

Hello and welcome to our forums,

This is because our [Test] button support uses only the 32-bit zone of the registries. So, by default it will search under the "Wow6432Node" registry key on 64-bit machines. The best way to test your registry search search result (which is stored in the search property, i.e. MY_SEARCH) is to add an "Execute inline script code" custom action with sequence, scheduled after Wizard Dialogs Stage -> Searches" and "Install Execution Stage -> Searches" action group, like this:
  • Source Type: Visual Basic Script (*.vbs)
    Script Text: MsgBox Session.Property("MY_SEARCH")
Also, please take a look on our "64 bit Registry problems" forums thread for further references about the registry search support.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”