What are we doing:
We do automatic deployment using the Nolio tool. One of the steps we need to take is to set some environment variables for the deployed applications - for example, JAVA_HOME , pointing to our preferred java installation directory.
We use the SET command to constantly set environment variables - and in most cases it works great. If I right-click on my computer and go into environment variables, they all look great.
Problem:
Unfortunately, later in the deployment, command line commands that rely on environment variables are executed, and the environment variables do not seem to be set. Using SET without parameters verifies this by displaying all currently available variables.
Now, if I restart the computer, the command line commands work fine. So the problem is that although the variables are constantly set and displayed in the GUI, they are not passed to the command lines until I reload.
Another interesting tidbit:. If I put the commands in the BAT file and double-click on it, it works fine, but if I run it on the command line, the variables will not be allowed until the reboot.
Does anyone know about this?
source share