« Build up of IT infrastructure is near completion -- How true is it for consumers? | Main | IT Still Matters »

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:

  1. There was no top level entry called HKCR. I figured it must be a short form for HKEY_CLASSES_ROOT.

  2. 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.

Comments (1)

david:

Check out article # 320148 from microsoft's support site entitled "How to: Start a command prompt in a folder in Windows 2000". This provides you the registry settings for creating a shortcut path to the cmd file as you described here. This is exactly what the Registryrobot did for you.

About

This page contains a single entry from the blog posted on June 1, 2003 11:24 PM.

The previous post in this blog was Build up of IT infrastructure is near completion -- How true is it for consumers?.

The next post in this blog is IT Still Matters.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.33