On my Windows 7 computer, I created some custom user environment variables (right-click computer > properties > "Advanced system settings" > "Environment Variables..." > "New..." for "User variables for ...") but when I echo them in command prompt it seems to not recognize one. For example, this is what I had:
UTILS_HOME C:\myUtils
UTILS_WILDFLY %UTILS_HOME%\wildflyUtils
I added both to the PATH variable in my user variables like this:
PATH %UTILS_HOME%;%UTILS_WILDFLY%
When I echo the PATH I get this:
C:\mytils;%UTILS_WILDFLY%
I expect that it would expand UTILS_WILDFLY but doesn't. Now if I change the name of UTILS_WILDFLY to JBOSS_8, when I echo the path it'll get expanded. I've tried several names for testing and do not understand why some expand and why some do not. When they do not expand I'm not able to access my scripts in that folder on the command line.
Is there some rule that I don't know about for naming environment variables or is this the way it works and I have to do trial and error until I find one that does work?
There are no typos when trying different names. I created the name for the variable and cut and paste it in the PATH variable to rule that out.