How to Add Menu Items Under the Right-Click or Context Menu

This tutorial explains how to add programs to the right-click menu.


Note: I will be adding a link for command.com or a DOS prompt since that is what was specifically requested, but any application can be added in similar fashion.

Right-click on File:.

    -Open regedit. (Go to Start\Run; type regedit.)
    -Expand until you are in HKEY_CLASSES_ROOT\*\shell.
    -If the key ‘shell’ does not exist, right-click on * and add a new key. Name it “shell.”
    -To add the item, right-click on shell, and create a new key. The name of this key will be what appears in the menu. I named mine “cmd.”
    -Next, right-click your newly created key, and create another key under it named “command.”
    -Double-click the default entry in this folder, and type in command.exe.
    -(If you are doing a different program, you would do the complete path to that program instead of command.exe.)
    Now, when you right-click on a file, the option to open a command prompt will be there.

Right-click on Folder addition:

    (I realize there is a tech-recipe for this already, but now it is all in one place.)
    -Open regedit.
    -Expand until you are in HKEY_CLASSES_ROOT\Folder\shell.
    -If the key ‘shell’ does not exist, right-click on Folder and add a new key. Name it “shell.”
    -To add the item, right-click on shell, and create a new key. The name of this key will be what appears in the menu. I named mine “cmd.”
    -Next, right-click your newly created key, and create another key under it named “command.”
    -Double-click the default entry in this folder, and type in command.exe.
    Now, when you right-click on a folder, the option to open a command prompt will be there.

Enjoy addition of any program you wish.
As always questions may be sent to william_a_wilson@hotmail.com

-William. § (marvin_gohan)

The Conversation

Follow the reactions below and share your own thoughts.

  • misha

    Thank you.

  • Hobsyllwin

    Oh thank you so much, this is what i was searching.
    +10

  • Anonymous

    It was useful. However I couldn’t add another where parameters needed to be passed in:
    1. I added “mvn clean install” as a key to shell
    2. I added “command” as a new key
    3. Under value for this key i added the command I usually run on dos prompt
    mvn clean install -Dmaven.test.skip=true

    It keeps presenting browse dialog and asks me to select the app to use to run.

  • Name

    The right-click on window configuration is under HKEY_CLASSES_ROOTDirectory

  • Name

    how do i add icons to the menus? please email me at meanhacker1@gmail.com

  • Anonymous

    this is all over the internet if you just found this out its simple for me there are usful to people like me to find out what registry keys are/do and to find out how we use it in programs

    1. This is not a HACK
    2. This is not an Easter egg
    3. Dont be suprised

  • Anonymous

    Thank is great Tut. Now i wounder how i pass on the file name information onto my pointed program. I will appreciate any helping idea.

  • Ghis

    thx;) I’ve been looking for this. I’ve already made the key for the item I needed.

    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT*shellEdit with Gimp]

    [HKEY_CLASSES_ROOT*shellEdit with Gimpcommand]
    @=””C:\Program Files\GIMP-2.0\bin\gimp-2.6.exe” “%1″”

    Peace
    Ghis

    • TheRealSatan

      thx Ghis;)

      I finally found something that works.

      Can you make one that copy a pic from the browser and send it directly to any photo editor (instead of copy/cut/paste+open editor+paste/from/clipboard ?)

      this would be great if you can do this and as easy to put to work as that key you made!! ;))

  • tesh

    hey dude…i am trying to add “Play with VLC” in context menu…when i do that and select a “.rar” file it only plays the first rar…rather than playing the entire movie which is the case when u select Open with VLC. dunno why it wont play the entire movie…wierd any suggestiosn ?

  • kas1943

    How can we ADD Advanced Find (Ctrl-Shift-F) to a right Click Context Menu in Outlook 2007. Specifically, when I place Mouse Mounter over an Outlook Folder, I want to Right Click and have Advanced Find Option like in Outlook 2003.

  • Sre

    Awesome!..thanks

  • http://www.facebook.com/people/Richard-Greens-Boult/100001604763939 Richard Greens Boult

    Using windows 7: Within Picasa, I want to add a right click option to use an EXIF/IPTC/Metadata editor. Damned if I can find out how to do it. any ideas ?

  • Dnlray2020

    Thanks a lot that was so helpful of you.

  • Guest Vest

    nice info, thanks

  • Farid

    what if i like to make some child of “cmd”. Means i have more then one options and i like to add to right click menu, so i like to add them in such a way. that i will make a parent option to right click menu and then add all others as child,
    Please give me a quick response …. thanks in advance.

  • gurudev

    Thank you,was searching for a way to add a “dos prompt” item to the right click menu of folders ;i knew the registry had to be modified ;just did not know which key to create or modify as messing with registry can be disasterous.this post helped .

  • casino online

    I absolutely love your blog.. Excellent colors & theme.
    Did you build this amazing site yourself? Please reply back as I’m hoping to create my own personal site and want to learn where you got this from or exactly what the theme is named. Cheers!

  • Builder

    Thank you. I have been waiting to find a way to do this for a long time. Your explanation was easy.

    • David Kirk

      You are welcome. Thanks for the kind words.

  • Raul

    Hi,

    I would like to create an option in my context menu that allows me to open a link with internet explorer. I have set Firefox as default browser but I have certain type of links that I need to open with IE.
    Is that possible?
    THANKS!

    Raul.

  • Ian

    Thanks.

    I found I already had one existing for ‘Open with SublimeText’ and learned it needs to take an argument for the file name. For example ‘Open with Canary’ command needs to know what file or it will just open Chrome Canary but not open the file you right clicked on.

    C:\Users\lotus\AppData\Local\Google\Chrome SxS\Application\chrome.exe “%1″

    Now my default browser is Chrome but for new devtools I can right click and open a html page with Canary :-)

  • safiyullah

    it not working at just displaying the given string key value

  • azzzzz

    when this added key will work? i closed the regedit but the new menu does not show.
    thanks

  • mojtaba

    Hi. How can I send path of the folder that I right click on it to the program that will be execute as an arguman.Tnx with big regards

  • darkgener

    a million thanks

  • Vlad

    Thanks!

  • James

    I would like a right-click option that I can use on hyperlinks anywhere.
    E.g. in an email / on a webpage / from a PDF.
    Is there a way to make a right-click option for ANY hyperlink, wherever it is?