From File Explorer to Command Window
I use Windows for some of my development machines but am far from being a Windows GURU. More than often I end up working with the command shell. At times, I would want to launch the command window with the directory selected by the File Explorer. This is not very convenient to do on a freshly installed machine -- You can create a shortcut on your desktop for cmd.exe (on Windows 2000), set the start directory for this shortcut and use it to launch the command window; but you will have to do "cd <pathname>" to get to the directory where you want to work.
Few months ago, I found a solution in a PC Magazine article describing a tool called RegistryRobot. Download the tool, install it on your machine and run the proper command through its menu driven user interface. This will add a "Command Prompt Here" on the directory popup menu associated with the File Explorer and one could launch a command window with the selected directory through the File Explorer.
This worked great but last time when I reinstalled Windows 2000 (which I seem to be doing quite often) and tried to download RegistryRobot, I found that I will have to pay a subscription fee. Bummer!
In any case, I had RegistryRobot installed on one of my other machines. So went there and found the following description to enable "Command Prompt Here" option:
- In Registry key HKCR\Drive\shell\Command Prompt here\command, add or change the value named (Default), changing its current data of (none) to cmd.exe /k cd "%1".
- In Registry key HKCR\Directory\shell\Command Prompt here\command, add or change the value named (Default), changing its current data of (none) to cmd.exe /k cd "%1".
I fired up the Registry Editor "regedit" and carried out these steps. The instruction were good but not perfect:
- There was no top level entry called HKCR. I figured it must be a short form for HKEY_CLASSES_ROOT.
- There were no sub-keys with name "Command Prompt Here" and "command". I had to create these.
The instructions got me what I wanted! They may also save you a good amount of unnecessary timing.