Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Related: How can I add a program to the context menu of all files?

I've created my custom context menu item, and it seems to work on all file types - even through shortcut links. (Selecting my custom option performs the operation on the shortcut target, not the .lnk file.) Now, I'd like to create an icon to make it stand out. My antivirus program and Notepad++ seem to have been able to do this, so I know it's possible. The only question is, how?

share|improve this question
up vote 6 down vote accepted

Open regedit.exe and find the key that you created for the custom menu item.

Now create a new String value in it and name it Icon. Double-click it and enter the path to your custom icon file:


Optionally you could use the Windows shell32.dll file like in my example: Registry

The result:

Icon in custom context menu

Just an additional note - looks like this method works on Windows 7 (and probably Vista) but the icon did not appear when I tested on Windows XP.

share|improve this answer
Thanks for the answer, and testing on XP. I'll have to give this a shot later today. Also, I've noticed your method seems to differ a bit from the answer to my previous question. (See link in this question.) In the previous answer, the text for the context menu item is stored in the key name. In yours, it's stored in a string value within the key. Is there any practical reason for the difference? – Iszi Feb 21 '12 at 13:27
@Iszi - not sure if there's any real difference. I just happened to find such an example – Siim K Feb 21 '12 at 18:59
It seems you're right about it not working on XP. I can't think of why it wouldn't, since my AV and Notepad++ still have icons. They seem to have their functions covered under HKCR\*\shellex\ContextMenuHandlers though, and I can't begin to decipher on my own how those keys work. – Iszi Feb 21 '12 at 19:39
Tested and works in Windows 7. I'll go ahead and post XP as another question. – Iszi Feb 22 '12 at 3:33
The .ico needs to be 32x32. – Blrp Jan 13 at 23:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .