Can I define a Windows (XP) environment variable in terms of another environment variable?
- by Yaneeve
I wish to define two environment variables as follows:
PROGRAM_HOME=P:
JAVA_DIR=%PROGRAM_HOME%\Java
Obviously the following works:
dir %PROGRAM_HOME%
But, the following doesn't:
dir %JAVA_DIR%
What should I do in the case I do wish to define JAVA_DIR in terms of PROGRAM_HOME?
EDIT: removed \ (it had been a typo)
PROGRAM_HOME=P:\ ==>PROGRAM_HOME=P: