I didn't get it working right, more complicated than I could deal with. If anyone else wants to take a look be my guest.
I have got it on the toolbar but it has 2 issues and I don't know if there will be any other issues or problems.
1. It doesn't open for the current open folder, it only works if you select a folder first and the command prompt will open with the path of the selected folder. The same as using shift + right click.
2. It shows when you select a file but opens with the error "The directory name is invalid." and defaults to C:Windows\System32.
So as I see it you have four options. Option two and three opens the command window for the current open folder even if a subfolder is selected but add an extra toolbar. You can also use all options together if you wanted.
- Use my somewhat working fix. Sorry I can't do better.
First download the attached reg file and text document.
You can edit the reg file to change the text that shows on the toolbar and the description when you hover over it if you want. To change the text modify the line "MUIVerb"="CMD" and the description modify "Description"="Open Command Window Here".
Now run the reg file.
Next follow Option Three in this tutorial Windows Explorer Toolbar Buttons - Customize
to modify the folder types reg keys. For the Value Data in Option three, Step 8 use "Custom.CMD" (without quotes).
The text document contains the keys I had to change in order to get it to work for normal folders, library folders and folders that are optimized for doc's, music, pic's and videos. These are listed in the tutorial as well under Folder Templates.
There's more folders there that you might like it to show (eg. search results) so have a look at the other keys in the tutorial and Regedit.exe if it's not showing up in a particular folder and if you have any problems just let me know and I'll try to help. Under regedit look at the CanonicalName.
- Use Classic Shell
with a Custom Button
The custom command you want is "cmd.exe /k pushd %1" (without quotes). The icon would not work with cmd.exe so use %SystemRoot%\System32\console.dll, 1
To display the Classic Shell toolbar you need to open explorer, press Alt to bring up the menu bar then go to View -> Toolbars -> Classic Explorer Toolbar. If you need any more help setting this up just ask.
You may also like Classic Shell for things like the status bar, the folder name in the title bar or the up button next to the back/forward buttons. I use it for these features but I don't use the toolbar, classic start menu or the IE stuff. These are the only changes it makes to my system.
- Check out StExBar
Just found this program, it looks ok and has a couple of nice features like being able to select one or more files and copy either the names or paths to the clipboard and a text box that you can run dos commands on a folder from in explorer, eg. open a folder in explorer and type xcopy *.* C:\Copied in the text box and it will launch a cmd window and run that cmd on the folder that you have open.
But the main thing is it has the command window on the toolbar by default and you can also add custom buttons.
- Using the context menu without shift
Open regedit and go to "HKEY_CLASSES_ROOT\Directory\Background\shell\cmd" and delete the value "Extended" and under "HKEY_CLASSES_ROOT\Directory\shell\cmd" also delete the value "Extended".
If you want to add an icon on the context menu for the command window then under those two keys create a new string called Icon with the value %WinDir%\System32\cmd.exe
Bit more info than you probably want but I thought I would cover a few options.
If you need more help with any of this just ask I'll be glad to help if I can.