How to set or edit an environment variable on Windows

Version 1

    Windows 7/Vista:

    1. Right-mouse-click on Computer and select Properties
    2. Down the left margin (under Control Panel Home) click the Advanced system
      Settings
      option/link
    3. Click the Advanced tab
    4. Click Environment Variables… button
    5. Click the New..., Edit..., or Delete buttons to add a new variable, edit an existing variable, or delete a variable.

     

    Windows XP:

    1. Right-mouse-click on My Computer and select Properties.
    2. Click the Advanced tab
    3. Click Environment Variables… button
    4. Click the New..., Edit..., or Delete buttons to add a new variable, edit an existing variable, or delete a variable.

     

    Key notes:

    • Consider the following differences when deciding whether to set an environment variable as a User variable or a System variable:
      • User variables only apply to the current user that is logged in.
      • System variables apply to all user accounts on the system.
    • If the New..., Edit..., or Delete buttons under the System variables section are grayed out, it means your login does not have the necessary level of permission to edit environment variables at the machine level.                     
      • Consider setting the variable in the User variables section at the top of the Environment Variables dialog.
    • If the same named environment variable is set as both a System variable and a User variable:                   
      • For the environment variable named PATH, the end value to Windows and any applications is the system defined PATH variable + the user defined PATH variable (directory paths are semi-colon delimited)
        • Run the "echo %PATH%" command in a command prompt window to see the behavior
      • For other variables the User defined value is observed and the System defined value is ignored.

     

    New..., Edit..., or Delete buttons