I can create a menu item in the Windows Explorer context menu by adding keys in the registry to HKEY_CLASSES_ROOT\Folder\shell.
How can I create submenu items to the just created menu item?
Right-click (or select and hold) on a file or folder to open the context menu. Select Show more options.
Press the Windows key and R simultaneously, type regedit and press Enter. Navigate to HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers and you will see a series of keys that related to existing menu entries. It is easy to delete any you no longer need access to – just right click a key and select Delete.
I believe anything non-trival you'll have to create a Context Menu Handler.
You'll have to create a COM object that will create the menus and carry out the commands as they're clicked. I've only done this using C++ and COM. I'm not sure if there are easier ways to do this.
Use SubCommands "SubCommands"="[NameOfMenu]"
Example for creating submenu for .TS files:
[HKEY_CLASSES_ROOT\SystemFileAssociations\.ts\shell\Encoding]
"MUIVerb"="Encoding video"
"SubCommands"="Encodex265Fade;EncodeTS2;watched"
"icon"="imageres.dll,-149"
"Position"=-
"MultiSelectModel"="Single"
"NeverDefault"=""
;"ExtendedSubCommandsKey"="Encode\\Fadein"
;"Icon"="C:\\Program Files (x86)\\CloudMe\\CloudMe\\favicon.ico"
More info: https://msdn.microsoft.com/en-us/library/windows/desktop/hh127431(v=vs.85).aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With