Free Game Downloads -- Sodaware.net

Free Game Downloads -- Role Playing Games, Puzzle Games and Action Games.

Adding Apps to the Windows PATH

Save typing by adding tool directories to the Windows PATH.

This is a simple change that can make using the Windows command line much easier. Adding a directory to the Windows PATH will mean Windows will search the directory when a command is entered. The main reason for doing this is that it acts as a shortcut for common applications you may run.

For example, instead of typing : "C:\Program Files\SomeProgram\Bin\MyProg.exe" --some-arg to launch an application, you can type MyProg.exe –some-arg. This has three main advantages:

  1. Looks Neater – This can be important if you’re using batch files. Long lines are hard to read, so shortening things is a good idea.
  2. Less Typing – Speaks for itself. If you use the command line or batch files for any amount of time, you’ll appreciate how much easier it is to use if you’re not typing full paths for your tools.
  3. Portable – Perhaps the most important detail. Not using hard-coded paths makes it easier to port your batch files to other machines.

Note: Be careful when editing your path variable, as you could render some programs unusable if you make a mistake. Also remember that changes won’t take effect until you restart the console.

Editing the Windows Path Variable

1) Right click “My Computer” and select “Properties” OR goto Control Panel and select “System”. This will open the “System Properties” window.

2) Switch to the “Advanced” tab, and select “Environment Variables”.

System Properties Dialog 

3) There are now two options. You can modify the global path variable, or add your own to your personal profile. If you want all users on the machine to have the same shortcut, add it to the global path, otherwise use the local one. 

a. To modify the global path variable – Find “Path” or “PATH” in the lower window (marked Global variables). Select Edit. Add the path to your application. Separate paths with a semi-colon (;). Add trailing slashes if you wish.

b. Either modify an existing one using the tutorial above, or select “new”, then enter “PATH” as the name of the variable and enter the path value in the environment value section.

Environment Variables Dialog

Modifying the Path Using the Command Line

If you’d like to do this using the command line, you can use the “setx” command included with Windows XP service pack two. To add the directory “c:\program files\SomeProgram\Bin” to your path, use the following:

setx path "%PATH%;C:\Program Files\SomeProgram\Bin"

Remember to include the %PATH% variable at the start of your setx command so that you’ll keep existing path names.


These icons link to social bookmarking sites where readers can share and discover new web pages.

Article Info

Date: April 10, 2007

Author: Phil Newton


Categories:

Hot Game Downloads

Blox Forever Deluxe

Blox Forever Deluxe

The sequel to the best-selling Blox Deluxe.


Pirate Poppers Pirate Poppers
Destroy the winding chains of cannonballs!
Fitznik Fitznik
Join Fitz on his quest for treasure!

No comments have been posted yet. Why not be the first?


Leave a comment [TrackBack URI]


Tags Allowed: a, abbr, acronym, b, blockquote, code, em, i, strike, strong

 


Browse By Date

Adventures in Shareware

Welcome to "Adventures in Shareware", the blog of an indie software business known only as "Sodaware". Learn all about indie games, the people that make them and how you can improve your own indie business.

Download Free Computer Games | Site Map | Links | Contact Us

© 2005-2007 Sodaware. All rights reserved. About Us | Privacy Policy