System Environment Variable - Advanced Installer Community

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!

fleetwoodfc
Posts: 3
Joined: Mon Dec 13, 2010 4:23 pm

System Environment Variable

Having trouble with setting and using a System Environment Variable. Basically I want to set JAVA_HOME and then run a batch file (install.bat) to install my application as a windows service - the batch file needs to use JAVA_HOME. I can't figure out how to set JAVA_HOME so that it is available to my install.bat file - under 'custom actions' I have the WriteEnvironmentStrings standard action in sequence prior to Commit. I run install.bat under InstallServices after Commit. JAVA_HOME is not available to install.bat but does show as being set after the install completes.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: System Environment Variable

Hello,

Please note that a System Environment Variable cannot be referenced by the installation process during which it's created. A solution would be to add a global prerequisite that creates the environment variable instead.

Regards,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”