How to set the windows path in Windows 7

 

How to set the path in Windows 7.

Goal:

Setting the windows command path in Windows 7

Additional information:

Modifying the path statement will enable an MS-DOS window opened in Microsoft Windows as well as older programs to locate files that may be required to run the program.

In the old MS-DOS environment we used the PATH= command, located in the autoexec.bat file. Additional information about the MS-DOS path command that is still usable in Windows 2000 and Windows XP can be found on our path command page, additional information about the MS-DOS command can be found on our set command page.

See our dictionary path definition for additional information about this term and related definitions.

Answer:

The path is now managed by Windows 7 and not the autoexec.bat or autoexec.nt files. To change the system environment variables, follow the below steps.

  1. From the desktop, right-click My Computer and click Properties.
  2. In the System Properties window, click on the Advanced tab.
  3. In the Advanced section, click the Environment Variables button.
  4. Finally, in the Environment Variables window (as shown below), highlight the Path variable in the Systems Variable section and click the Edit button. Add or modify the path lines with the paths you wish the computer to access. Each different directory is separated with a semicolon as shown below.

    C:\Program Files;C:\Winnt;C:\Winnt\System32

Windows enviromental path settings

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Print | posted @ Wednesday, October 21, 2009 7:54 AM

Comments on this entry:

Gravatar # re: How to set the windows path in Windows 7
by anon at 2/5/2010 8:10 AM

thanks - it worked
Gravatar # re: How to set the windows path in Windows 7
by SgtPooki at 2/10/2010 2:23 AM

Thank you!
Gravatar # re: How to set the windows path in Windows 7
by Matthías at 3/4/2010 1:02 AM

How to fix the 1st step, on Windows 7.
"1.From the desktop, right-click My Computer and click Properties."
0.1 press start, A.K.A. windows button on keyboard.
0.2 locate "computer", should be in left middle.
0.3 press right mouse button on "computer".
0.4 press properties from the option pane.
0.5 see step 2 and so forth.
Gravatar # re: How to set the windows path in Windows 7
by Jasdip at 3/8/2010 7:55 PM

Thanks so mush i changed it for a file and the file dident work so i wanted the orignal back so yha thanks

WINDOWS 7 ROCKS!!!!!!!!!
Gravatar # re: How to set the windows path in Windows 7
by Pat C at 6/11/2010 11:21 AM

I have just upgraded my wifes' computer from XP Pro to Win7 Pro 64. This was done with the aid of PC Mover. Her original O/S drive was "I", but it is now "C". The other drives also had their designation changed. How can I set a path to reflect these changes so that her original programs and data are accessible?
Thanks for your assistance.
Gravatar # I can't find "my computer" anywhere
by brucer at 8/28/2010 10:03 PM

I'm trying to change the path so I can find my compilers

Windows 7 has been on this box about 3 months, and is about to get heaved.

Everyone says :right click "my computer" on the desktop; I can't find "my computer" anywhere
Gravatar # re: How to set the windows path in Windows 7
by neeraj at 9/11/2010 7:37 AM

Thanks for quick help. Many thanks.
Gravatar # re: How to find my original values of the path variable in the in Windows 7
by vindy at 9/24/2010 5:25 AM

I was trying to install PHP so had to change the path variable, but could not save the original path and I mixed up the thing, now I need to set my path with the original values.

have no idea what to do.

please give me a solution

thankx

would like to know how I can reset my values to the original values
Gravatar # re: How to set the windows path in Windows 7
by somsavine VONGSISOUPHANH at 9/29/2010 9:20 AM

I would like to the java programing
Gravatar # re: How to set the windows path in Windows 7
by bedspread at 9/30/2010 5:52 AM

Excellent, great explanation, nice and simple! Cheers....
Gravatar # re: How to set the windows path in Windows 7
by SscoootzZ at 9/30/2010 11:44 AM

I found this post to be very informative & helpful, as well, and greatly appreciate the insight and support of the GWB community. However, in my experience, accessing the Windows Path varied slightly from what is described here. I'm running Windows 7 Pro on an out-dated Sony VAIO box, FYI, though I doubt the box-type matters much in terms of the variation I found.

That said, I did right-click on 'My Computer'. However, this prompted more of a shortcut to '\Control Panel\System'. Therefore I present my steps JIC anyone else, like me, finds themselves looking at a screen not described in the original set of instructions as provided by admin @ 20091021.0754. Thanks in advance, again, for this website, as it is full of great insight and support for super-user "n00bs" like myself. I find the instructions and guidance to be thoughtful and well-written, not too über or elitist.
[Note for users like myself: It is very important to understand that changes made to System Properties under 'Environment Variables' are changes made to your PC which can potentially alter the way your system functions. It is always advisable, IMHO, to create a Restore Point prior to making any System changes. "An ounce of prevention..."

SscoootzZ Instruction Remix (props/cred to admin):

1. From the Desktop, right-click on 'My Computer'.
*This action brings me to 'Control Panel\System' screen with "View basic information about your computer" at the top.*
2. In left pane, click 'Advanced System Settings'.
*This action invokes the 'System Properties' GUI console with various tabs, 'Computer Name,' 'Hardware,' etc.*
3. Select the 'Advanced' tab.
*This action reveals settings options for 'Performance,' 'User Profiles,' and 'Startup & Recovery'.*
4. Select 'Environment Variables'.
*This action opens the 'Environment Variables' for the current logged user.*
5. Under the heading 'System Variables' scroll down to 'Path' and highlight it. Then click 'Edit'.
*This action will invoke the 'Edit System Variable' GUI.*
* !!NOTE!! Do not alter the entry @ 'Variable Name'. If you do not wish to edit your 'Path' variable click 'Cancel' to back out of the process without enacting any changes.*
*Note: There are no spaces in the 'Path' variable entry.*
6. Under the input field, 'Variable Value' enter the desired additions or changes to 'Path'.
*For this entry it is crucial to enter the data 100% accurately. The OS does not interpret the value, it must be entered exactly as scribed in the hard disk file structure in order for 'Path' instructions to be followed.*
7. Click 'OK' to authenticate the 'Path' change(s).

Fín

Namasté,
SscoootzZ
Gravatar # re: How to set the windows path in Windows 7
by Renso at 10/1/2010 11:59 AM

Thanks heaps SscoootzZ for adding great detail, much appreciated.
Gravatar # re: How to set the windows path in Windows 7
by alandubs at 10/5/2010 7:19 PM

Way better solution is to create your own PATH in the User Variable section, it will be appended to the System path when that user is logged in. Less chance of messing something up, as vindy found out.
Gravatar # re: How to set the windows path in Windows 7
by prasad at 10/26/2010 11:47 PM

Thanks a lot for the detailed explanation. I have made the necessary changes and I still get an error message.

The changes that I have done are:
Variable name: PATH
Variable value: C:\Program Files\Java\jdk1.6.0_22\bin

The program compiles ok but when I run the program, I get the following error:

D:\Java>javac book.java

D:\Java>java book.java
Exception in thread "main" java.lang.NoClassDefFoundError: book/java
Caused by: java.lang.ClassNotFoundException: book.java
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: book.java. Program will exit.


Please let me know what else needs to be changed
Thanks
Gravatar # re: How to set the windows path in Windows 7
by Pattabi at 11/18/2010 10:17 AM

Thanks, it is working.
Gravatar # re: How to set the windows path in Windows 7
by Miguel at 11/24/2010 6:42 PM

Use http://www.redfernplace.com/software-projects/patheditor/
Gravatar # re: How to set the windows path in Windows 7
by Brad at 12/1/2010 6:11 PM

I was downloading Java JDk for my cpu. I went to set the path and replaced it with what I wanted to tag on the end. How can I go back and fix this? I don't know what it was originally.
Gravatar # re: How to set the windows path in Windows 7
by Renso at 12/2/2010 8:26 AM

First of you may reset it to the original setting to:

Windows XP: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;{plus program paths}
Windows 7: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;{plus program paths}

Alternatively you could look for some previous version of the path in the registry. In Windows 7 you would look for "Path" name under Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment. If you do not see the previous version of what you would expect, continue down the list "ControlSet002", "..03", etc. The current version will be under Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\....

Open the registry by typing "regedit" in the command line to get to then regitry.
Gravatar # re: How to set the windows path in Windows 7
by Jacqueline at 12/5/2010 2:55 PM

One thing to note, I also came here looking for help on installing the Java development kit. I had to restart my computer before it registered the changes to the path.

You can check if you've got the path set up right (for jdk) by opening a command window and typing "javac" and hitting enter (don't actually type the quote marks). If the path isn't right yet, it'll say:
""'javac' is not recognized as an internal or external command, operable program or batch file."
Gravatar # re: How to set the windows path in Windows 7
by Sherman Unkefer at 12/16/2010 6:04 AM

i tried this but there is still an 'application extension' by the same name. This does not get deleted. Is this ok..?
Gravatar # re: How to set the windows path in Windows 7
by sorgulama at 12/19/2010 7:27 AM

Thanks heaps SscoootzZ for adding great detail, much appreciated.
Gravatar # re: How to set the windows path in Windows 7
by magnet link at 1/18/2011 6:55 AM

Thanks very useful for me.
Gravatar # re: How to set the windows path in Windows 7
by Apsinthos at 1/28/2011 7:48 AM

Thanks a lot SscoootzZ info helps me a lot
Gravatar # re: How to set the windows path in Windows 7
by RGP at 3/2/2011 4:28 PM

Thanks for the help on a frustrating MS to iTunes QT error! Easy instructions even for a non-geek:)
Gravatar # re: How to set the windows path in Windows 7
by RGP at 3/2/2011 4:28 PM

Thanks for the help on a frustrating MS to iTunes QT error! Easy instructions even for a non-geek:)
Gravatar # re: How to set the windows path in Windows 7
by ciyyid at 3/4/2011 10:04 AM

i wrote the command where the java is installed and still not working need help plz
Gravatar # re: How to set the windows path in Windows 7
by Ra'ed at 3/17/2011 7:59 PM

I installed the download and install MS HPC SDK
from
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=12887DA1-9410-4A59-B903-693116BFD30E
I added PATH for run my prog.cpp under windows
my Q's how I can compile my mpi program under windows
Gravatar # re: How to set the windows path in Windows 7
by David K at 3/21/2011 9:21 PM

The original answer above is wrong. The answer shown is for Windows XP, not Windows 7. In Windows 7, if you have the Computer icon on the desktop, you must LEFT click it twice, then select Advanced system settings, then you can select the Advanced tab, then the Environment variables button. Windows 7 works a little differently than Windows XP with the Computer icon.
Gravatar # re: How to set the windows path in Windows 7
by David K at 3/21/2011 9:35 PM

Correction, double left click the Windows 7 Computer icon, select System Properties, then select Advanced System Settings, then select Advanced Tab and Environment variables.
Gravatar # re: How to set the windows path in Windows 7
by regcure at 3/23/2011 9:01 AM

Thank you for the tips, but they haven't changed it since Windows XP. Doing the same things you can set the windows path in Windows XP also. I will post here how to make a registry entry that does that automatically. That won't make your life simpler, but you'll learn how to toy around with Regedit.
Gravatar # re: How to set the windows path in Windows 7
by regcure at 3/23/2011 9:03 AM

Thank you for the tips, but they haven't changed it since Windows XP. Doing the same things you can set the windows path in Windows XP also. I will post here how to make a registry entry that does that automatically. That won't make your life simpler, but you'll learn how to toy around with Regedit.
Gravatar # re: How to set the windows path in Windows 7
by ATK at 3/29/2011 12:30 AM

or just hit the start button, type in "environment variables" and it should bring up something you can click that says "Edit the system environment variables"
Gravatar # re: How to set the windows path in Windows 7
by Home Renovation at 4/19/2011 12:47 AM

I was downloading Java JDk for my cpu. I went to set the path and replaced it with what I wanted to tag on the end. How can I go back and fix this? I don't know what it was originally.
Gravatar # re: How to set the windows path in Windows 7
by Home Renovation at 4/19/2011 12:52 AM

Way better solution is to create your own PATH in the User Variable section, it will be appended to the System path when that user is logged in. Less chance of messing something up, as vindy found out.
Gravatar # re: How to set the windows path in Windows 7
by mothers day flowers Singapore at 5/4/2011 4:02 AM

Hey great stuff, thank you for sharing this useful information and i will let know my friends as well.
Gravatar # re: How to set the windows path in Windows 7
by Nirmalya Parua at 6/20/2011 9:54 PM

I am able to set correct path in acount with administrative privelege, but when I use an user account where I still see the correct path variable
(like right clicking properties, and then see environment variable in advanced setting), I still see error when I try to launch a compiler.
Gravatar # re: How to set the windows path in Windows 7
by ranou at 6/23/2011 1:23 PM

nothing happened.. its still showing the error "'javac' is not recognized as an internal or external command, operable program or batch file."
Gravatar # re: How to set the windows path in Windows 7
by sangeeta at 6/30/2011 10:56 AM

i have removed all the paths by mistake how to get back all these back
Gravatar # re: How to set the windows path in Windows 7
by swathi at 7/3/2011 3:27 AM

Thanks a lot for the detailed explanation. I have made the necessary changes and I still get an error message.

The changes that I have done are:
Variable name: PATH
Variable value: C:\Program Files\Java\jdk1.6.0_22\bin

The program compiles ok but when I run the program, I get the following error:

D:\Java>javac book.java

D:\Java>java book.java
Exception in thread "main" java.lang.NoClassDefFoundError: book/java
Caused by: java.lang.ClassNotFoundException: book.java
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: book.java. Program will exit.


Please let me know what else needs to be changed
Thanks
Gravatar # re: How to set the windows path in Windows 7
by Manu at 7/7/2011 2:32 PM

hey i am not able to set path... i followed all the steps and reached till the variable value ..i am wondering what to enter in place of the existing value... please help me
Gravatar # re: How to set the CLASSPATH of servlet and jdbc .jar files to run the serv let program in Windows 7
by Nisha at 7/15/2011 1:05 AM

Please help me to resolve my problem....

Thank you..
Gravatar # re: How to set the windows path in Windows 7
by rohith at 7/17/2011 4:41 AM

Thanks Its working....:)
Those who guys doent,Set the path correctly..and dont forget to put semicolon at the end of the path(variable value)
Gravatar # re: How to set the windows path in Windows 7
by Aegean BM at 7/18/2011 5:03 PM

PATH tells the OS where to find Java. If you get an error message like "java.lang.NoClassDefFoundError: book/java", it means you set up PATH correctly (because the message comes from Java, not the OS.) The nicer, easier way is to check PATH is to type
javac -version

OK, so if PATH is working, what is the problem? You have to compile java code into an executable for a Java machine. (The executable is also called "byte code" and "class files"; the Java machine is also called a JVM.) A dot on a Java machine is folder path delimiter. book.java = book/java. So ...

(compile first, you are still on your native OS, so the dot is just a file extension.)
javac book.java
(then start JVM and run the class, now you are in a Java machine, so the dot is a folder delimiter.)
java book
Now you have to set up CLASSPATH or use
Gravatar # re: How to set the windows path in Windows 7
by Renan at 7/20/2011 1:40 AM

Very helpfull, thanks
Gravatar # re: How to set the windows path in Windows 7
by rajthilak at 8/9/2011 4:13 AM

i have just installed jdk-7-windows-i586 on my windows 7 i couldn't configure. pls help me how to run a simple pgm in it .It installs into Program Files (x86).
Gravatar # Best online pharmacy-buy medicine,Codeine,Percocet,Xanax,Vicodin
by buy xanax online at 8/12/2011 7:32 PM

The positive comments and do well wishes are very motivational and greatly appreciated.
Gravatar # re: How to set the windows path in Windows 7
by ekta at 8/20/2011 6:28 AM

thanx for give me a solution
Gravatar # re: How to set the windows path in Windows 7
by Wes at 8/26/2011 12:26 PM

In my specific case, I changed my D: drive to K:. Just before the QuickTime statement it was trying to pull up an AMD utility on the D: drive. Removing that statement worked like a charm.... itunes is up and running again!
Gravatar # re: How to set the windows path in Windows 7
by Bhagya at 9/9/2011 6:27 AM

It really helped. Thanks a lot.
Gravatar # re: How to set the windows path in Windows 7
by Joe at 9/17/2011 2:43 PM

The path is fine but when I run programs like Dr. Java it says that there is no compiler. I have an assignment due at in 8 hours and I doubt I will get it in on time but it would be nice to know how I can fix this.
Gravatar # re: How to set the windows path in Windows 7
by maquinas de coser at 10/5/2011 7:30 AM

Hey its been really a very good and informative post to read on. I will keep these points in my mind from now onwards, hope will not commit mistakes
Gravatar # re: How to set the windows path in Windows 7
by maquinas de coser at 10/5/2011 7:32 AM

Hey its been really a very good and informative post to read on. I will keep these points in my mind from now onwards, hope will not commit mistakes
Gravatar # re: How to set the windows path in Windows 7
by Javin @ Classpath in Java at 10/7/2011 9:55 PM

isn't it same like earlier version of windows ?
Gravatar # re: How to set the windows path in Windows 7
by Gonzalo at 10/12/2011 6:03 PM

thanks!! it was really helpfull!
Gravatar # re: How to set the windows path in Windows 7
by Chandrika Prasad at 10/19/2011 11:43 PM

Thanking
to help me
Gravatar # re: How to set the windows path in Windows 7
by Dxtr at 10/31/2011 10:35 AM

There is a perfect environment variables editor - RapidEE. Must have - http://www.rapidee.com
Gravatar # re: How to set the windows path in Windows 7
by Mark Reed at 11/15/2011 12:25 AM

Thanks for the info. I needed to set the path so I could access the java compiler directly for my CS 161 class.
Gravatar # re: How to set the windows path in Windows 7
by John Seilberg at 11/18/2011 2:07 PM

Can anyone help me? I have recently messed around with my laptop, as my son needed Java JDK set up, and I changed the path system, but now nothing that runs on Java will work!
What I did was change the path under Environment Variables in My Computer. All I want is to find out my original path. Please help!
I am running on Windows 7 64 bit, using a Dell Inspiron.
Gravatar # re: How to set the windows path in Windows 7
by renso at 11/21/2011 6:52 AM

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShel l\v1.0\
Gravatar # re: How to set the windows path in Windows 7
by apartment for rent at 11/21/2011 3:58 PM

Hey thanks for all this information makes me very happy inside tha tyou took the time to get it out to us
Gravatar # re: How to set the windows path in Windows 7
by canada goose canada at 12/6/2011 3:00 AM

This post has been somewhat of a revelation to me.
Gravatar # re: How to set the windows path in Windows 7
by canada goose canada at 12/6/2011 3:09 AM

I really wish I hadn’t seen this as I really want one now!
Gravatar # re: How to set the windows path in Windows 7
by canada goose canada at 12/6/2011 3:10 AM

I just required some information and was searching on Google for it. I visited each page that came on first page and didn’t got any relevant result then I thought to check out the second one and got your blog. This is what I wanted!
Gravatar # re: How to set the windows path in Windows 7
by Extreme Java at 12/7/2011 7:42 AM

Yes Windows 7 environment variables are same as with earlier versions.

Build Path with Eclipse
Gravatar # re: How to set the windows path in Windows 7
by download software at 12/12/2011 1:39 AM

This is great and I hope the users are having a great experience and being able to deliver more in less time.
Gravatar # re: How to set the windows path in Windows 7
by vijay at 12/18/2011 1:09 AM

How to set the windows path in Windows 7
Gravatar # re: How to set the windows path in Windows 7
by click here at 12/19/2011 9:12 PM

I love this site so much right now, I've been having this problem for days, the amount of times I've looked at the monitor and thought about putting my head through is unbelievable. Thank you so much for sharing this knowledge.
Gravatar # re: How to set the windows path in Windows 7
by Loan Agreement at 12/26/2011 8:05 AM

Very interesting. Thank you for sharing and merry christmas
Gravatar # re: How to set the windows path in Windows 7
by Helicopter flight at 12/26/2011 3:59 PM

I think when java is working and javac is not working we have to follow the above instructions, Am i right??
Gravatar # re: How to set the windows path in Windows 7
by Helicopter flight at 12/26/2011 6:02 PM

I think when java is working and javac is not working we have to follow the above instructions, Am i right??
Gravatar # re: How to set the windows path in Windows 7..... i have to do assembly language programs... help me
by nani at 1/2/2012 7:28 AM

How to set the windows path in Windows 7..... i have to do assembly language programs... help me
Gravatar # Stoni
by medicine forum at 1/2/2012 1:57 PM

Thank you, I have recently been searching for information about this topic for ages and yours is the best I have discovered so far.
Gravatar # re: How to set the windows path in Windows 7
by Adam smith at 1/5/2012 6:06 PM

i setup windows 7 from a while and after reading your article and do what you say , its work good .thanks
Gravatar # re: How to set the windows path in Windows 7
by Dominos Coupon Code at 1/7/2012 5:39 PM

Very interesting. Thank you for sharing and happy New Year!
Gravatar # re: How to set the windows path in Windows 7
by pranav at 1/14/2012 8:42 AM

Very good tutorial and good explanation.
Thanks for such a detailed tutorial
Gravatar # re: How to set the windows path in Windows 7
by landscape photography at 1/17/2012 4:27 AM

I am not yet familiar with windows 7, yet this guide will help me for sure through the process.

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 
Twitter