3

I often use the right-click "open command window here" feature of Windows-7, but just found a problem where the environment it gives is different than what I get on running cmd from the start line, or from the start menu cmd.

Specifically for me there are things which are in my PATH (verified from MyComputer/properties/advanced/environment) which are missing in the right-click environment, correctly present in the others.

Why? Any easy fix?

W7 seems to use the command: cmd.exe /s /k pushd "%V" for the right-click option.

It seems that there are multiple cmd.exe’s around, one is C:\Windows\System32\cmd.exe, another in c:\Windows\sysWOW64, and a few others lying around under c:/Windows, but both give the wrong PATH environment. I am not sure what the start-menu cmd actually starts!

2
  • Hmm, sorry if the wrong place to post, I saw several very similar (378319, 60904, 5724, ...) - I'm happy to migrate to another place on the forum if more appropriate.
    – guthrie
    Commented Sep 20, 2012 at 20:16
  • No problem. :-) They probably were here before there was a SuperUser. When things expanded from StackOverflow to the StackExchange group of sites, new places appeared and posts started being referred/migrated to them, but the old posts are still here. The FAQ was updated to show what types of questions are appropriate here now. :-)
    – Ken White
    Commented Sep 20, 2012 at 20:19

1 Answer 1

2

I fixed this problem by restarting explorer.exe.

I think the issue I ran into was that I edited %PATH%, but explorer was using a stale version of it.

This will also happen if you already have a command window open when you edit an environment variable: the changes don't reflect in the window that is already open, only in new windows that are created.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .