Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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!

share|improve this question

migrated from stackoverflow.com Sep 20 '12 at 23:55

This question came from our site for professional and enthusiast programmers.

    
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 Sep 20 '12 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 Sep 20 '12 at 20:19

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.