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
- Click
Start
orWindows
button (or pressWindows
key in the keyboard). - In the
Search
box start typing System Environment Variable. - Click
Edit the system environment variable
from the search results. - In the System Properties window
Advanced
tab click 'Environment Variables...' button at bottom right. - In the
System Variables
section locate for thePath
variable and clickEdit...
button to open the Edit System Variable window. - From the Edit System Variable window copy the full text of the path variable value to a notepad window.
Make sure thatFormat > Word Wrap
is on for the Notepad window for easier visibility. - Check the value of the Path variable in the Notepad window and do any editing that is necessary.
- 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.
- 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.
- Click
OK
to close the 'Environment Variables...' window. - Click
OK
orCancel
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