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!

seadub
Posts: 2
Joined: Mon Jun 02, 2014 6:14 pm

Appending Java bin directory to path after installing

We define the JDK as a pre-install prerequisite for our installer. Unfortunately the Java installer doesn't modify the user or system PATH to add it's bin directory. We'd like to have our installer append the java bin directory to the PATH if we installed it as a pre-requisite (or if we can't detect that, maybe if we don't see an entry on PATH that looks like Java). I see we can add environment variables, but I can't seem to attach them to the JDK pre-requisite (maybe because it's a pre-install one?). I also can't see how I can use some custom code/logic for finding the full filepath of the Java install to pass along to append to PATH.

Any ideas on how we can achieve this?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Appending Java bin directory to path after installing

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

I'm afraid we don't have predefined support for this. However, as a workaround you can create your own custom action which will search for Java install location, if found will enumerate all paths of the PATH environment variable and, finally if the JAVA location is not in there then add it to PATH. The custom action could be added as a custom action with sequence, scheduled after "Install Execution Stage -> Add Resources" actions group as deferred. You can take a look on "JRE installation directory in Windows" thread which could be useful for you.

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

Return to “Building Installers”