How can I add an icon to my custom context menu item in Windows 7?

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:

c:\folder\icon.ico

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.


...And If you want, you can use the default/same icon that your program (exe file) already is using.

Simply use something like below as the content of your Icon string value that @Slim K pointed you to in his answer:

"C:\Path\to\YourProgram.exe",0

Sublime Text 3 doesn't use an icon for its context menu option. So I added an Icon string value with the content you see in screenshot.

1

2