Speed Linking - April 11, 2007 Welcome To The New Samanathon.com!

Windows Hacks: Improve The Context Menu, Part 4

Written by Saman Sadeghi on April 12, 2007 Add comments

The Windows Context Menu appears when you Right-Click an object, whether it’s the Desktop or a file. I’m sure you’ve used it. The problem is, it’s missing some very basic options! We’re going to change all of that: This Registry Hack is part of a series on hacking the Windows Context Menu.

Open The Command Prompt From The Right-Click Context Menu

I love the Command Prompt - it’s a geek’s best friend when it comes to doing something quick and easy! The problem is that, when I’m working in Windows Explorer and I need to run the Command Prompt from the current window, I have to opening a command prompt and then navigating to the folder I’m currently in - which is frequently quite a few folders deep!

There’s a quicker way to get there with a Registry Hack (and you know I love Registry Hacks! :grin: ) We can add an option to the right-click context menu that will open a command prompt window at your current location!

Example

Let’s say you wanted to open the Command Prompt in your My Documents folder, you would simply right-click and then choose to open a command prompt, which would open it at:

C:\Documents and Settings\Your User Account\My Documents

How To

Warning: Before you play in your Windows Registry, please read this important information on editing the Windows Registry.

Open the Registry Editor by hitting the Windows Key+R, typing regedit. Navigating to the following location:

HKEY_LOCAL_MACHINE/Software/
Classes/Folder/shell

Note: Within HKEY_LOCAL_MACHINE/Software/Classes, there is a key named .Folder - we want the key named “Folder” without the period before it.

Once you’re at the shell key, right-click it and select New->Key. Name this new key Command Prompt.

Add A New Key To The Registry

Next, in the right plane, double click the (Default) value and name it whatever text you want to appear when you right-click on a folder - name it something descriptive like: Open Command Prompt.

Now, right-click the newly created Command Prompt key and create another new key. Name this new key Command.

Add Another New Key To The Registry

In the right plane, double click the (Default) value and enter the following into the Value Data field:

Cmd.exe /k pushd %L

You should end up with the following:

The Final Result In Adding The Registry Keys

You can now exit the Registry, the new menu option will show up immediately!

Note: The option wont appear when you right-click on a file - it only shows up when you right-click on a folder.

The Command Prompt Option In The Right-Click Menu

Explanation

Here is an explanation of the value we entered:

Cmd.exe /k pushd %L

We’ll break it down into parts:

Cmd.exe

This makes the call to open the Windows Command Prompt.

/k

Usually, the Command Prompt exits after you issue a single command. This switch tells the Command Prompt that it isn’t being used to issue only a single command and to remain open.

pushd

Tells the Command Prompt to store the name of the current directory.

%L

Uses the name that was stored by the pushd command to start the Command Prompt at that location.

Start Slide Show with PicLens Lite PicLens
This post is filed in: Command Prompt, Registry Hacks, Windows Tips And Tricks and has been viewed 1,868 views times.

Speed Linking - April 11, 2007 Welcome To The New Samanathon.com!

Racoon Mario Suggests You Read These Related Posts:


Racoon Mario
  • Windows Hacks: Improve The Context Menu, Part 1
  • Windows Hacks: Improve The Context Menu, Part 3
  • Windows Hacks: Improve The Context Menu, Part 2
  • Windows Key + F1
  • Registry Hack: Delete The My Recent Documents Icon From The Start Menu


  • RSS feed | Trackback URI

    2 Comments »

    Comment by Tech Bold 2007-08-10 13:26:04

    MyAvatars 0.2

    What can I say, you’re a registry expert. :mrgreen:

     
    Comment by Leo 2007-09-08 01:41:56

    MyAvatars 0.2

    I supose the CmdHere powertoy does the same thing?

     

    Leave a Reply

    Name (required)
    E-mail (required - never shown publicly)
    URI
    Your Comment (smaller size | larger size)
    You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.
    Speed Linking - April 11, 2007 Welcome To The New Samanathon.com!