I want to make a .bat file that adds a directory to the Widows XP environment varible. How do I do this?
edited because my first answer wasn't quite correct. From http://vlaurie.com/computers2/Articles/environment.htm In the command line and in batch files, PATH can be modified by the command path = dir1;dir2;dir3 This command will create a PATH environment variable consisting of the three directories dir1, dir2, and dir3. Note that the directory names are separated by a semicolon in the command statement. (An alternate form omits the "equals" sign.) This command will replace any previous directories that were in the PATH variable. To add a directory "newdir" to the current path use the statement path = %PATH%;newdir It is essential to remember that any changes that are made in a command window only endure until the window is closed. For permanent changes, use the method discussed in another section. It is also possible to use the command-line executable setx.exe that is contained in the Windows XP Service Pack 2 Support Tools. The other section is here: http://vlaurie.com/computers2/Articles/environment.htm#editing and has some other options that should help.