Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Normally in Windows Explorer, I can open a command window by shift right-clicking in the folder. I love this feature.

However sometimes this item is missing from the context menu. This is really frustrating. On investigation, it's precisely when window is labelled 'documents library'.

How can I fix this? Either so the 'open command window' items shows up in both cases, or to force all Windows Explorer windows to be of the first kind.

enter image description here

enter image description here

share|improve this question
Libraries are potentially a union of many folders at the same time. How would your system know which member folder to use? – Zoredache Jul 15 '13 at 22:59
possible duplicate of Can I browse windows 7 libraries from the command prompt? – Raystafarian Jul 15 '13 at 23:01
@Zoredache what do you mean? I understand there's both 'public documents' and 'my documents', but there's only one folder on my computer called felicitous-desktop, it's at C:\Users\Matt\Documents\felicitous-desktop. – Colonel Panic Jul 15 '13 at 23:11
@Raystafarian that's not my question! I'm asking how do I open a command window at C:\Users\Matt\Documents\felicitous-desktop (that's an ordinary folder) from a Windows Explorer of the second kind. – Colonel Panic Jul 15 '13 at 23:12
The documents folder is a library which is why it doesn't work. You should either not include that folder in the library, or move that folder to a different place c:\folder – Raystafarian Jul 15 '13 at 23:17

I located a solution here for adding the 'Open Command Window Here' option to the Context Menu for Library Folders.

You just have to add a few registry keys:

HKEY_CLASSES_ROOT\LibraryFolder\background\shell\cmd (set value to what you want to be displayed on the right click menu, e.g. "Open command window here"
HKEY_CLASSES_ROOT\LibraryFolder\background\shell\cmd\command (set value to "cmd.exe /k")

If you're not familiar with the registry editor, you can just copy the following text into Notepad, save it as whatever.reg, and double click it: Windows Registry Editor Version 5.00

@="Open command window here"
@="cmd.exe /k"

I did it in a slightly different way, exactly copying the keys and values that appeared in the cmd key within the Directory/background folder. The result is a little different, as the command window is opened at the location you expect (the current folder), rather than "c:\Windows\system32" as with the above.



@="cmd.exe /s /k pushd \"%V\""

To address the comment by @Zoredache, this ambiguity only exists when the folder you are viewing is the union of folders, as indicated when the header section of your folder has something like this.

enter image description here

In this case, the location that the command window opens to is whichever directory in your Library is set as the 'Default Save Location'. Other than that, it behaves as-expected.

share|improve this answer
Your registry script is invalid. There must be a a header such as REGEDIT4 or Windows Registry Editor Version 5.00 to allow the .REG file to work. After I did that, it worked fine. Apparently I am not allowed to edit and fix this – bryc Apr 30 at 23:35

For some reason, Libraries doesn't have the 'Open command window here' option like normal folders. But it's possible to add it by modifying the registry:

Windows Registry Editor Version 5.00

@="cmd.exe /s /k pushd \"%V\""

This registry script will enable the familiar option in Libraries. To install it, save the above as a .reg file and run it.

If for some reason it doesn't work or you want to remove it, save the following as a .reg:

Windows Registry Editor Version 5.00
share|improve this answer

This might get you close: The page has a download for a .reg file that purportedly disables libraries in Win7, This oughtta prevent any situations where you are getting the library style explorer windows, but its a bit of a kludge

Normally I would prefer to use (and recommend) pages which will actually list the steps rather than offering only a .reg file. I've seen this .reg on a few sites, but all of them decline to include a run down of the changes made, saying it is more complicated than a normal registry hack. I would strongly recommend reading through the .reg file first to be sure it's doing what you expect.

share|improve this answer

Your Answer


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.