Setting the Path Variable in Windows

Tag: 

PATH is an environment variable on Unix-like operating systems, DOS, OS/2, and Microsoft Windows, specifying a set of directories where executable programs are located. In general, each executing process or user session has its own PATH setting.

When a command is entered in a command shell or a system call is made by a program to execute a program, the system first searches the current working directory and then searches the path, examining each directory looking for an executable filename that matches the command name given. Once a matching executable file is found, the system spawns a new process which runs it.

PATH variables are specified as a list of one or more directory names separated by semicolon (;) characters [1].

To check which paths are set:

  1. open the Command prompt
  2. type: echo %path%

A list of paths will be output. Use this check after adding a new path to be sure it has been set.

Setting the PATH in Windows 10

  1. Close the Command prompt if it's open.
  2. Right on click the Windows start menu icon
  3. Choose Control panel
  4. Choose System > Advanced system settings
  5. In the System Properties dialog box click on the Environment Variables button
  6. In the Environment Variables dialog box System Variables section scroll down and highlight the Path variable
  7. Click on the edit button
  8. In the Edit System Variable dialog box, click inside the Variable value text box to modify the path by specifying the directory where the executable program are located. If you don't have the item PATH, you may select to add a new variable and add PATH as the name and the location of the directory where the executable program is located as the value.
  9. Click on the "ok" button
  10. Click on the "ok" button
  11. Click on the "ok" button
  12. Reopen Command prompt
  13. Type: %path%
  14. Look to see if your path has been set

Setting the PATH in Windows 8 [2]

  1. Close the Command prompt if it's open.
  2. Drag the Mouse pointer to the Right bottom corner of the screen
  3. Click on the Search icon and type: Control Panel
  4. Click on > Control Panel > System > Advanced
  5. In the System Properties dialog box click on the Environment Variables button
  6. In the Edit windows, modify the PATH by adding the location of the directory where the executable program are located. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the directory where the executable program is located as the value.
  7. Click on the "ok" button
  8. Click on the "ok" button
  9. Click on the "ok" button
  10. Reopen the Command prompt
  11. Type: %path%
  12. Look to see if your path has been set

Setting the PATH in Windows 7 [2]

  1. Close the Command prompt if it's open.
  2. Select Computer from the Start menu
  3. Choose System Properties from the context menu
  4. Click Advanced system settings > Advanced tab
  5. Click on Environment Variables, under System Variables, find PATH, and click on it.
  6. In the Edit windows, modify the PATH by adding the location of the directory where the executable program are located. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the directory where the executable program is located as the value.
  7. Click on the "ok" button
  8. Click on the "ok" button
  9. Click on the "ok" button
  10. Reopen Command prompt window
  11. Type: %path%
  12. Look to see if your path has been set

References:

  1. wikipedia
  2. java.com