Quickly access the command prompt

Quickly access the command prompt

As a programmer you sometimes need to use the command-line and start some command from a certain directory. This little registry hack show you how you can easily add a menu item to the context menu of Windows Explorer. These are the actions to take:

  1. Start the Registry Editor (regedit)
  2. Add the following key: HKEY_CLASSES_ROOT\Directory\shell\Command.
    Change the (default) value to ‘Command prompt’.
  3. Add the following key: HKEY_CLASSES_ROOT\Directory\shell\Command\command.
    Change the (default) value to ‘cmd.exe /k “cd /d %L”‘

This works for MS Windows Xp and newer versions of MS Window.

Leave a Reply

Your email address will not be published. Required fields are marked *