How To Add/Edit Environment Variables in Windows 7

If you are a geek who has experience in Linux, you would know exactly what I’m talking about. If not, environment variables are a set of predefined variables that make system functional properly. The same also applies in Windows, though, as normal user, you don’t really need to worry about them.

Recently, I was looking at some Android documentation and trying to set up a development environment on my Windows 7. One of the steps is to add a directory path into the PATH environment variable. I had to admit that Google didn’t put much effort into the documentation to make us go through it easily.

To install the SDK, simply unpack the starter package to a safe location and then add the location to your PATH.

No explanation on how to do this.

So how exactly are you going to do this?

To add or edit anything environment variables in Windows 7, you need to go to System Properties first.


Then, go to “Advanced system settings”,


Under “Advanced” tab, click on “Environment Variables …” button at bottom.


Double click PATH and add new path into the “variable value”. Make sure you separate the value with “ ; “


Let’s sum up what we just did

PATH is an environment variable that holds all the executable shell commands. When you type something in the command prompt, it will go through all the path and search for the match of the command line utility name you have just entered.

In short, there are tons other environment variables in Windows, if you are interested in how it works, you can go to Technet documentation and check out.

Related posts:

  1. How To Change Default Edit Open Image In Photoshop Or Other Editor
  2. How To Use Paint Drawing to Edit Images in WordPad in Windows 7 [tips]
  3. How To Access User Profile's AppData Folder the Easiest Way in Windows 7
  4. Installing Windows 8 in A Virtual Environment with VMware Player
  5. Installing Windows 8 in A Virtual Environment With Oracle VirtualBox
  • coffee-turtle

    Thank you for this tips (and this excellent site)!

    I guess Google figured that if someone didn’t know what it meant to add a program’s path to a system’s environment, they shouldn’t be a programmer. ;-)

  • mark

    If you’re tired of the small cumbersome windows in all Windows versions for Environment Variable editting, check out It’s a free environment variable editor that takes advantage of real windows capabilities. I’m a user of the app, not the developer.

  • Shah Newaz Alam

    Thanks a lot. This was the information I was searching for. Was stuck on to exactly the same thing, while trying to set up my comp for Android app development.

    • Jonathan

      glad it helped out :P

  • Josh

    You can also type sysdm.cpl in the search line of the Windows button and it will bring up the system properties box. Click on the Advanced tab and then select “Environment Variables”. Everything else is the same. A quicker way for us geeks ;)

  • Calebs

    Can you do this for all users?  Like a computer configuration instead of a profile configuration?

  • anoop


  • ejobity

    thanks useful

  • Pingback: echo %ANT_HOME% returns %ANT_HOME% : Android Community - For Application Development

  • Mike

    Thank you.

  • Rohit5

    Great tutorial. by the way here is the step by step tutorial I follow to edit PATH environment variable in Windows 7 and Windows 8

  • Pingback: win7, sublime text2, c++ compiler

  • la

    Thank you. Very clear and concise.

  • Junior

    Great tutorial. Thank you greatly

  • Ahsan Idrisi

    should there be a semicolon at the end of the last string