Add custom commands to Explorer’s context menu

Just a nifty little tip I picked up today.

Modified Explorer context window

I’ve added links to commands to open up a Command prompt, or Metapath, a nifty little file browser that I use as like a “solution explorer” when, say, editing lots of HTML, PHP or CSS files (from Florian Balmer, the creator of my favourite “lite” text editor, Notepad2).

So, how do you do it? Simple(ish). Open up regedit* and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell. Create a new key (doesn’t matter, AFAIK, what you call it), and set the (Default) property to whatever text you want to appear in the context menu. Next, create a key under that, called “command”. Set the (Default) property of the command you want to run when that is selected.

So to open up the command prompt:

cmd.exe /k pushd %L

And for Metapath (this is assuming you’ve just dumped it straight into C:, you can modify this as appropriate):

c:\metapath.exe "%1"

Editing the registry

Of course, you could just use the “Open Command Window Here” PowerToy – but this is geekier. And more general 🙂

Please note that this all assumes you’re running Windows XP. I have not, and do not intend to, test it for other versions of Windows.

While we’re at it, Oren explains how to replace Notepad with Notepad2 under Windows XP SP2.

Notes:
* To start regedit, go to the Start Menu and select “Run”. Type “regedit” when the Run dialog comes up. Be careful with regedit. You can do some serious damage to your environment with regedit, so you may want to back up the registry first.

Update, 25/11/07. Added link to Notepad2 replacement procedure. Also, worked around WordPress’ annoying tendency to replace quotes with fancy-looking but useless Unicode characters (presumably, they do this in order to serve you better). It’s rubbish like that that makes me want to write my own blog engine and be done with it.

Advertisements

9 Responses to “Add custom commands to Explorer’s context menu”

  1. Brin Says:

    Hello, nice site 🙂

  2. massage in Birmingham Says:

    I was curious if you ever thought of changing the page layout of
    your blog? Its very well written; I love
    what youve got to say. But maybe you could a little more in the
    way of content so people could connect with it better.
    Youve got an awful lot of text for only having one or two images.
    Maybe you could space it out better?

  3. buy best perfume Says:

    Hi there! This post couldn’t be written much better! Looking through this post reminds me of my previous roommate! He constantly kept preaching about this. I will send this post to him. Pretty sure he will have a very good read. Many thanks for sharing!

  4. ebay management software Says:

    Its like you read my mind! You seem to know so much about this, like you
    wrote the book in it or something. I think that you can do
    with some pics to drive the message home a little bit, but
    instead of that, this is excellent blog. An
    excellent read. I will definitely be back.

  5. cheap Bass boats Says:

    Hi, I think your site might be having browser compatibility issues.

    When I look at your blog site in Opera, it looks fine but when opening in Internet Explorer, it has some overlapping.

    I just wanted to give you a quick heads up! Other then that, wonderful blog!

  6. Hublifte preiswert Says:

    Actually when someone doesn’t understand then its up to other users that they will help, so here it occurs.

  7. watches Says:

    An intriguing discussion is definitely worth comment. I do believe that
    you need to write more about this topic, it may not be a taboo matter but usually people don’t speak about such subjects. To the next! All the best!!

  8. best essay writing service Says:

    I’m not sure why but this website is loading incredibly slow for me.
    Is anyone else having this problem or is it a issue on my end?
    I’ll check back later and see if the problem still
    exists.

  9. bakaug@gmail.com Says:

    I’ve found it a little difficult to find computer parts without having to buy whole computers and tearing them apart myself. . I want to start my own business using the computer parts, but where can I get the computer parts (the small parts)? I have tried my local recycle center and no success.. I’m on the verge of contacting an established computer craftsperson and cosigning to their business. . . Anyone with ideas or advice?.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: