Open a command prompt in any folder using Windows Explorer

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 Server 2003 :

Windows Registry Editor Version 5.00
BLANK LINE GOES HERE

[HKEY_CLASSES_ROOT\Directory\shell\OpenNew]
@="Command Prompt"
[HKEY_CLASSES_ROOT\Directory\shell\OpenNew\Command]
@="cmd.exe /k cd %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.

About Wayne Maples

Share this article


Article not looking right or info is missing? Let us know so that we can fix it: .


Receive all the latest articles by email!

Receive Real-Time & Monthly WindowsNetworking.com article updates in your mailbox. Enter your email below!
Click for Real-Time sample & Monthly sample

Become a WindowsNetworking.com member!

Discuss your network issues with thousands of other network administrators. Click here to join!

Community Area

Log in | Register

Limited time offer!

SolarWinds screenshot

Subscribe to WindowsNetworking.com Newsletters today and get a free copy of the new SolarWinds Exchange Monitor!

Readers' Choice

Which is your preferred software-based Backup solution?