Wise Packaging

Modify the System and User Path Variables with Pathman.exe 

06-04-2008 06:28 PM

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/

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

06-30-2008 12:33 PM

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 :)

06-05-2008 12:56 PM

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

06-05-2008 09:00 AM

Whats wrong with
SET PATH=%PATH%;C:\Program Files\Perl

Related Entries and Links

No Related Resource entered.