delete items from path environment variable

6,651

User environment variables

User environment variables can be viewed from Control Panel as well. The user may add, delete or modify the environment variables in the User Environment Variables for User field. These variables take precedence over system environment variables. The user path is appended to the system path.

Next commands could help to identify the problem (return system-level defined path and user-level defined path, respectively):

reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v Path
reg query HKCU\Environment /v Path
Share:
6,651

Related videos on Youtube

dubbbdan
Author by

dubbbdan

I am a recent engineering graduate working with the Grand Canyon Monitoring and Research Center in Flagstaff, AZ. Most of my programming experience is in VB and VBA and i am trying to broaden my horizons with as many new languages as I can. I enjoy finding solutions that automate tasks that have previously been done by hand.

Updated on September 18, 2022

Comments

  • dubbbdan
    dubbbdan over 1 year

    I have a question regarding editing the path environment variable on my windows 7 Machine. I have been editing my path using SystemPropertiesAdvanced.exe's dialog window, but the changes i make are not reflected when I type echo %PAtH% on the command line. It shows my additions of path variables, but does not remove the unwanted path variables I deleted. How do I get echo %PATH% and the advanced system properties to display the same path variables?

    Thanks in advance,

    dubbbdan

    • Admin
      Admin almost 9 years
      Just wanted to confirm that after making changes you are exiting and re-launching the command prompt where you are testing with your echo.
    • Admin
      Admin almost 9 years
      I have closed and reopened the cmd prompt. I think it has something to do with my user account. If i open the cmd prompt as an administrator I see the correct PATH, but as a standard user I see the correct PATH with all of the variables I have deleted from the SystemPropertiesAdvanced.exe dialog window. I tried this solution with no luck.
  • dubbbdan
    dubbbdan almost 9 years
    Thanks @JosefZ! That certainly seems to explain the difference between system and user path variables.