Search code examples
windowsexplorerwindows-shell

Is there a way to get past the 16 entry limit for context menus?


I'm trying to add a cascading context menu through use of the "ExtendedSubCommandsKey" interface provided by Explorer. However, as I add more items, I've noticed that the number of items that I can put in a single Explorer context menu is cut off at 16. I've tried prefixing them with numbers so that they show up in order, too.

Here's a .reg file that I made to install all of the menu keys: http://pastebin.com/DeEXRqfK

It's supposed to provide 3 menus (Personalization, Configuration, Administrative), but it only gives 2 and the second one is missing some items. I can provide a screenshot.

I'd like to use this method for creating context menus, but I do know C/C++ and could probably implement something there, if needed.

UPDATE: The IContextMenu interface might give me a better way to make context menus, but I still would like to use the registry as I've written code in Python to generate .reg files like the one above.

UPDATE: I tried doing this in HKEY_LOCAL_MACHINE but it didn't work either...

UPDATE: In tried implementing the IContextMenu interface in Visual Studio, and it's really complicated. Once again, I'd REALLY like to use the registry.


Solution

  • Well, I never found a complete/working solution to this that doesn't use COM, so I decided to write my own context menu maker. It lets you write context menus using .yml files, and lets you embed them in Windows Explorer. It's not completely perfect, but it doesn't use COM so it's quite simple.

    Here it is