User Tip #35: Open a command prompt in any folder using Windows Explorer

Hits: Failed to execute CGI : Win32 Error Code = 3


I find the command prompt very productive. I want to be able to use Windows Explorer to navigate anywhere on the box and then by right clicking a folder, have a command shell open up in that folder. The following registry hack gives you that capabiltiy in Windows 2000 / Windows XP / Windows NT :

REGEDIT4
BLANK LINE GOES HERE
[HKEY_CLASSES_ROOT\Directory\shell\Command] @="Command &Prompt"
[HKEY_CLASSES_ROOT\Directory\shell\Command\command] @="cmd.exe \\\"%1\\\""
BLANK LINE GOES HERE

Take the above file and save it as command.reg or shell.reg or whatever. To make the registry edit, run it by double clicking the file in Explorer or running it as a programs from the command shell. Don't be concerned about the REGEDIT4 line which is NT4. This .reg file will make the correct registry edit for NT, W2K and XP. When you run it, you will be asked Are you sure you want to add the information in command.reg to the registry?. Answer yes. You should then see the message Information in command.reg has been successfully entered into the registry. At this point you should be able to browse your drives and right-click on any folder. One of the options should now be Command Prompt which will open a command shell in that folder when selected. Enjoy!

For more information on .reg files, see Understanding .REG files

By the way, you if want to start up Windows Explorer in the current directory, simply type on the commandline:

start.





well written. it is essential. or at least very valuable.

Keywords: windows 2000 tip, w2k, windows xp,command prompt, shell, folder, explorer, navigate, right-click, right click, .reg, regedit4