Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Appending variable paths

Status
Not open for further replies.

ottge

Technical User
May 2, 2005
22
US
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.
 
Way above my head, but what is this fellow talking about? I notice he mentions "JAVA_HOME" in some of his examples.

path_set 1.3 has been released

There might be something here, but I don't really know, you may have to catch the eye of Forum member "markdmac" who is our expert on these type of questions.


 
Thanks for the information. One of the variables that I need to append to with a certain application involves JAVA_HOME, but there are others as well. Using setx.exe seems to work fine for the system path, as it does append to it, such as in the following example:

setx path "%PATH%;c:\home" -m

However, if I use a similar statement with another variable, it simply overwrites the variable value, rather than appending. I'll give the program you made reference to a try and see what happens. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top