mO SharemO Share

How To: Set the PATH variable in environment variable in Windows

INTRODUCTION

This article describes how to locate the PATH environment variable in your Windows operating system and edit the same if necessary.

STEP-BY-STEP GUIDE

  1. Click Start or Windows button (or press Windows key in the keyboard).

  2. In the Search box start typing System Environment Variable.

  3. Click Edit the system environment variable from the search results.

  4. In the System Properties window Advanced tab click 'Environment Variables...' button at bottom right.

  5. In the System Variables section locate for the Path variable and click Edit... button to open the Edit System Variable window. 

  6. From the Edit System Variable window copy the full text of the path variable value to a notepad window.
    Make sure that Format > Word Wrap is on for the Notepad window for easier visibility.

  7. Check the value of the Path variable in the Notepad window and do any editing that is necessary.

  8. When you are ready to set the value, select the complete text in Notepad by pressing Ctrl+A. Press Ctrl+C to copy the whole text.

  9. Replace the copied value in the 'Variable Value' box in the 'Edit System Variable' window and click OK to save the value back to Path variable. 

  10. Click OK to close the 'Environment Variables...' window.

  11. Click OK or Cancel to close the 'System Properties' window.

The Path environment variable is now set.

Important

 If you had any open command prompt window before editing the Path, do not forget to close and re-open it as any existing open command prompt will not have the effect of the changed Path variable.

If anytime it is found that either the PATH variable is not available or PATH variable doesn't have any values, that means, somehow this problem occurred and it will definitely create problem to run a many applications and commands. Example, ODAC installation will fail. All Windows system must have some default values when the OS gets installed freshly. More values keep getting added as different applications get installed. But the default values must be present in PATH variable in any Windows system Windows 7 / Windows Server 2008 or above.

Default PATH Values are (Change the drive letter C: if Windows is installed in any other drive ):

C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0