I've recently come across the setx.exe utility from Windows XP Resource Kit. I have been able to successfully append the system path, but whenever I attempt to append another variable, the value is overwritten. For example, I need to add a variable:
setx JAVA_HOME "c:\java" -m
This works as it should. However, if I need to add to the path:
setx JAVA_HOME "%JAVA_HOME%;d:\java" -m
will overwrite the existing value for JAVA_HOME. Again, this issue does not happen with editing the system path variable. If anyone could recommend a solution to this, it would be greatly appreciated. Thanks.
setx JAVA_HOME "c:\java" -m
This works as it should. However, if I need to add to the path:
setx JAVA_HOME "%JAVA_HOME%;d:\java" -m
will overwrite the existing value for JAVA_HOME. Again, this issue does not happen with editing the system path variable. If anyone could recommend a solution to this, it would be greatly appreciated. Thanks.