computer help index
 
 
Search:
"Offering free computer help, hints, and tips to the Internet populace." Now with over 3,360 tips!

Windows XP and DOS

Modify the System and User Paths

SUMMARY: The PATHMAN DOS command can make it easier to modify the system and user paths used by Windows XP.

If you are in the C:\TEMP directory and type in NETSTAT at a command prompt to view active connection statistics, Windows will most likely not find "netstat.exe" in the C:\TEMP directory.

However, the C:\WINDOWS\SYSTEM32 directory is in what's called the path, or a list of directories Windows uses if it can't find an executable in the current directory. Since C:\WINDOWS\SYSTEM32 contains the file "netstat.exe", Windows will run the command from there.

By using the SET command with the PATH environment variable, you can modify Windows XP's path. However, doing so can be messy and error-prone.

If you frequently need to modify the PATH, the Windows 2003 Resource Kit comes built-in with a command called PATHMAN, or Path Manager, that lets you cleanly modify the system and user paths.

To use this command, you'll need to first download and install the Windows 2003 Resource Kit. Then you can run pathman.exe and use one of the following options:

/as PATH
Adds a semicolon-separated PATH to the system path

/au PATH
Adds a semicolon-separated PATH to the user path

/rs PATH
Removes a semicolon-separated PATH from the system path

/ru PATH
Removes a semicolon-separated PATH from the user path

Examples:

C:\>pathman /as c:\morecommands

This adds the directory "c:\morecommands" to the system path. After restarting the current command prompt or opening a new command prompt, any batch files or executables located in the "c:\morecommands" directory are now executable from anywhere on your system.

Type the following command in a new DOS window to see your modified PATH environment variable:

C:\>set path

Now, to remove the directory from the path:

C:\>pathman /rs c:\morecommands

This removes the directory "c:\morecommands" from the system path. After restarting the current command prompt or opening a new command prompt, any batch files or executables located in the "c:\morecommands" directory will only be executable from within the "c:\morecommands" directory.

Type the following command in a new DOS window to see your modified PATH environment variable:

C:\>set path

 

 
Add: Del.icio.us | Digg | Furl | My Yahoo!
 

Discuss This Tip

Print This Tip

Get E-Mail When New Tips are Online

Return to the Windows XP and DOS page.


More in MalekTips:
Windows XP and CalculatorSpywareBlasterMedia Center Edition 2005



Transferring Numbers Between Views[MODIFIED] Protect Against Particular ActiveX ControlsPlay Solitaire

RSS Feeds - Subscribe!
 

You want the latest tech tips and tricks in your e-mail Inbox - FREE? Type your e-mail address below and click 'Subscribe'.
 



( sample / details ) ( opt-out instructions )
 


 Free Offer! - Subscribe to the MalekTips computer help list and be one of the first to get new computer tips, articles, and download links! ( privacy policy )  ( opt-out instructions )
This page and its contents are copyright
©1997 - 2008 Envision Programming. ( copyright/disclaimer )

Home | Free Computer Help Newsletter! | Windows | Web Development | DOS and Batch Files | Removing Spyware
Digital Camera and Photography | Computer and Internet | Software | Microsoft Word
Computer Articles | About | Contribute a Tip | Link To Us! | Computer and Technology Links
RSS Feeds |  Contact Us | Advertising | Privacy Policy | Computer Help Forums