Modify the System and User Path Variables with Pathman.exe
The DOS command PATHMAN.exe can make it easier to modify the system and user paths used by Windows XP.
You can modify the path environment variable directly from set path command in DOS. But if you do this you can remove the already existing paths instead of appending them.
The Windows 2003 Resource Kit comes built-in with a command called PATHMAN, with the help of which you can modify/append the PATH environment variable.
Then you can run pathman.exe and use one of the following options:
- /as PATHAdds a semicolon-separated PATH to the system path
- /au PATHAdds a semicolon-separated PATH to the user path
- /rs PATHRemoves a semicolon-separated PATH from the system path
- /ru PATHRemoves a semicolon-separated PATH from the user path
Example: C:\>pathman /as c:\Program Files\Perl
This adds the directory "c:\Program Files\Perl" to the system path.
You can check the path by executing this command:
C:\>set path
To remove the directory from the path you need to execute the below:
C:\>pathman /rs c:\Program Files\Perl
This removes the directory "c:\Program Files\Perl" from the system path.
To check that the path is gone with your directory you can run the below commmand:
C:\>set path
For more information you can visit my blog: http://msiworld.blogspot.com/
The Endpoint Management Community Blog is the perfect place to share short, timely insights including product tips, news and other information relevant to the Endpoint Management community. Any authenticated Connect member can contribute to this blog.
Comments
Variable
Whats wrong with
SET PATH=%PATH%;C:\Program Files\Perl
There is nothing wrong with
There is nothing wrong with it. there a few advantages. you never actually accidentally delete the path variable. Also you can chose to add either the path in user or system path variable. Third, you can also delete a certain path variable with help of pathman.exe
Piyush Nasa Altiris Certified Professional (ACP)
http://msiworld.blogspot.com/
Wierd
I have never heard of a System path? Do you know how this is represented in the Set like the user path is path=
Been working with dos command lines forever. Guess I will have to bone up on them :)
Lee Wilburn
Suzlon Wind Energy
If your question has been resolved, please click "Mark as Solution"! Thank you. Hope it helps!
Would you like to reply?
Login or Register to post your comment.