39
3
When I update my PATH using either the built-in Environment Variables dialog, or something like Path Editor, and then open up a command-prompt, the changes to my PATH will not register with the console, depending on where the command-prompt was started from.
For example, if I edit my PATH and then start cmd.exe from the Start Menu or a shortcut on the Desktop, then my PATH looks fine: it has successfully been updated; however, if I start cmd.exe from a shortcut anywhere other than the Start Menu or Desktop, the new PATH does not get read and I get the old path instead. It's very strange.
I've tried running the command prompt from a shortcut on the desktop and it works fine; I then copy that exact same shortcut to a sub-folder on the desktop, and I get the non-updating PATH problem.
I realise this is quite hard to explain, so I created a screencast to show this issue in action.
Here's a screenshot of the Command Prompt shortcut as seen in that screencast:
This is on Windows Vista Home Premium SP2.
make great sense. – lwpro2 – 2014-11-06T03:16:20.017
3Why was my answer voted down? If there is a flaw in it, let me know and I'll try to fix it. – Charles Roper – 2010-05-14T10:50:01.677
Charles, perhaps because it would have been better to explicitly correct the Q's inaccurate "if I start cmd.exe from a shortcut anywhere other than the Start Menu or Desktop, the new PATH does not get read". – ChrisJJ – 2020-02-02T23:27:41.060