3

Related:

How can I add a program to the context menu of all files?
How can I add an icon to my custom context menu item in Windows 7?

The first linked question covers how to add a custom context menu option for all files. This has been tested in Windows XP and Windows 7. The second question is about adding an icon alongside that menu item. The answer provided works in Windows 7, but strangely not in Windows XP. Since the question was tagged as , and since XP seems to be an odd exception for this, I figured I'd spin this question off onto its own.

I know this should be possible in Windows XP, because programs like Notepad++, WinZip, and some Antivirus applications have their icons in the context menu. However, their context menu items appear to be part of a registry key path (or series of keys) with which I'm not at all familiar.

So I'd like to know how can I add an icon to a context menu item created using the method in the first linked thread here? Or, if that's impossible (or improper), what's the "right" way to create menu items similar to the examples I've given?

0

1 Answer 1

3
+50

Those menu entries get created from a shell extension, which are COM based dlls. With the unfamiliar registry entries, you probably mean COM class registrations, and the associated GUIDs.

Writing a shell extension requires programming knowledge, and it has a certain performance overhead, because your library must be loaded into every application that displays such a context menu.

It's probably possible to create a single shell extension, that reads the Icon registry entry, and thus enables Win7 like behavior.

I don't know if there is a simple, built in, declarative way to do this in WinXP.

1
  • Nearly everything that has a shell extension icon seem to reference DLLs, and mostly seem to be listed under the registry in HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers or HKLM\Software\Classes\Directory\Background\ShellEx\ContextMenuHandlers so this is probably close to whats needed. The former seems to be more common though
    – Journeyman Geek
    Feb 25, 2012 at 3:30

You must log in to answer this question.

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