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.
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.
FOLLOW US
Get the latest news in Application Packaging