Windows » Common

Ways to Change the PATH

I. System Properties

1. Open Environment Variables window.

  1. Through Control Panel

    1. Go to Control Panel -> System (Win+Break).
    2. Go to Advanced tab (in Windows 7 select Advanced System Settings from the left panel).

      Change PATH Advanced system properties

    3. Press Environment Variables.

      Change Environment Variables

  2. Using Run window

    1. Press Win+R
    2. Type the command
      1. Windows XP
        • “control sysdm.cpl,,3″
        • press Alt+N
      2. Windows 7
        • “rundll32 sysdm.cpl,EditEnvironmentVariables”
    3. Enter

2. Under User variables or System variables find Path and change.

II. Command Line

  1. Use the PATH command to set the path for current session only

    path [new-path];%path%
  2. Use the SETX command to change the path permanently.
    • to set path as a User variable

      setx path "%path%;[new-path]"
    • to set path as a System variable

      setx /m path "%path%;[new-path]"

      Change PATH setx command

III. Registry editor

  1. Win+R -> “regedit”
  2. Go to the branch
    1. To change PATH as a User variable:

      HKEY_CURRENT_USER\Environment
    2. To change PATH as a System variable:

      HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment
  3. Change the PATH value.

    Change Registry

Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>