ATTENTION: If you want to link or quote content from AskVG.com, please do read our copyright policy.

How to Add / Remove Entries in Context Menus




Guys

In this tutorial, I’ll tell u how to add your own customized entries in context menus and how to remove unwanted entries from context menu:

A. Open regedit and goto:

HKEY_CLASSES_ROOT\* (for adding an option in All files context menu)
HKEY_CLASSES_ROOT\Directory (for adding an option in folders context menu only)
HKEY_CLASSES_ROOT\Drive (for adding an option in Drives context menu only)
HKEY_CLASSES_ROOT\Unknown (for adding an option in unknown files context menu)

B. Now under the above mentioned keys, u’ll find “Shell” and “Shellex” keys. Both keys contain various entries, which are displayed when you right-click on a file, folder or drive. We’ll use “Shell” key in this tutorial:

1. Right-click on the “Shell” key and select “New -> Key“.
2. Give it any name. suppose we gave it name “vishal”.
3. Now in right-side pane, double-click on “Default” String value and set its value to the Label which you want to display in context menu. Like if you want to add “Winamp” in context menu, then you can give it name “Open with Winamp” or similar.
4. Now create another key under this newly created key “vishal” with the name “command” and in right-side pane set value of “Default” to the path of application. For ex, for winamp you can set its value “%programfiles%\Winamp\winamp.exe”.

Thats it. Now u’ll get in the context menu.

A few Important points:

1. If you add just the path in “Command“, then it’ll open the application but if you append “%1” (without quotes) in the path, then it’ll open the selected file with the application. So in case of setting the value to “%programfiles%\Winamp\winamp.exe”, set it “%programfiles%\Winamp\winamp.exe %1″ and now it’ll open the file in winamp.

2. Step 3 can be omitted and u can assign the application name directly to the new key. i.e., either set “Default” String value to the name of application or directly set the key name to application name. e.g. instead of setting the key name to “vishal”, you can directly set its name to “Winamp”, in this case leave the “Default” as it is.

3. With the help of this tut, u can add application shortcuts in any filetype context menu. e.g., if u like to play with “*.txt” file context menu, then goto:

HKEY_CLASSES_ROOT\txtfile

so you can follow this tut for any filetype.

C. Same methods applies for removing entries from context menu. Just goto “Shell” or “Shellex\ContextMenuHandlers” and delete the unwanted key under these keys.

9 Replies:

  1. hi Vishal,
    If HKEY_CLASSES_ROOT\Directory is for folders context menu then what is
    HKEY_CLASSES_ROOT\Folder for?
    and what does “%1″ %* after the path, for the Default, of the command key mean?
    and in some case the value data for Default of the command key is simply “%1″ %*. So what does it mean in this case?
    And how do we change the type of the Default of command key from REG_SZ to REG_EXPAND_SZ? Does it matter if it is any one of them?
    Plz clarify.

  2. As far as I know “HKEY_CLASSES_ROOT\Directory” is for the context menu for the desktop desktop…

    “HKEY_CLASSES_ROOT\Folder” is for folders’ context menus…

    The “%1″ is used in Command Prompt and in windows. It means to “run” the following file…

    Hope this helps :smile:

  3. Hello Vishal
    I tried to change the default icon of a folder from folder option > file types. i changed the default icon, but when i apply the settings “Search” becomes the default option for context menu. when i double click on the folder. how could i fix it please help me

  4. ^^ Open regedit and goto:

    HKEY_CLASSES_ROOT\Directory\shell

    Now delete all existing keys under it.

  5. Thanx sir information on your site is very beneficial i do many changes in my xp without making my operating system slower.
    Thanx a lot.

  6. I appreciate your efforts, thank you very much.

  7. I appreciate your efforts, thank you very much.

  8. Bookmarking this page immediately, this is one of the articles on your website I am most interested in. Thanks again! :smile:

  9. ^^ Thanks. I’m glad you liked it. ;)


Wanna Reply?


Your Ad Here