Forum > Windows
IExplorerCommand shell extension
rpetges:
Hi all,
With Windows 11, Microsoft implemented changes regarding extending context menus. In fact, old shell extensions based on IContextMenu are now legacy and no more displayed in the context menu's root, but in a 'Show more options' sub-menu.
New shell extensions should be build with IExplorerCommand but no examples can be found.
Can anybody provide some insightful information ?
Many thanks !
d7_2_laz:
@rpetges, you asked this, meanwhile, twice and had none responses yet at all, but i don’t wonder why. Net researches for IExplorerCommand and Delphi etc. won’t return any results that might be applicable to preserve the existing system context menu behavior on Win11 without major efforts. The MS api documentation here is - said politely - not very helpful. This is a pity.
The main challenge – imo – would be to keep an app’s context menu ie. for files and folders objects like it is on Win10’s IContextMenu when running Win11. Actually it appears to stay alive within a sub-menu. That’s why I’m myself very interested in this topic because the tools I wrote as my daily working horses I’d expect to behave just as before.
My personal conclusion is: if i once need to buy a new workstation (but i don’t want to do this - mine is really fast enough but cannot upgrade due to missing bios TPM), then I’d apply the – meanwhile wellknown – workaround to preserve the “classic” (“legacy”) Win10 context menu using a registry tweak.
Eg:: https://winaero.com/how-to-enable-full-context-menus-in-windows-11/amp/
In fact, this is a bad necessity of course. As long as no better method is in sight.
rpetges:
I searched a lot for IExplorerCommand and Delphi and there is nothing. Even the API definitions don't exist for Delphi or FreePascal/Lazarus.
I know that the legacy shell extensions with IContextMenu can still be used with the "Show More" options or through a registry key. To be honest, none of my customers seem to use the new Win11 context menu as I did not get a single request to implement the new context menu.
However, since Windows 11 I have an issue with the IContextMenu as it's impossible ( at least for my extension ) to be used with a selection of more than 17 items. For more than 17 items, the context menu item from my shell extension does not show anymore. The same shell extension works fine in Windows 10 when I select hundreds of files/folders.
I tried the shell extension skeleton from Marco Cantu and it has the same problem.
Could you please test your shell extension in Windows 11 and select more than 17 items ? Does the context menu entry show up ?
Best regards
d7_2_laz:
As of now i’m solely still on Win10 and unfortunately cannot test with Win11 yet; I’m simply motivated by the question: what will happen in future.
My coding (Win10) was following a proposal from ASerge, see this link, there are test projects within: https://forum.lazarus.freepascal.org/index.php/topic,53996.msg400431.html#msg400431
Windows 11 has an issue with the IContextMenu regarding a limited number of selected items … that sounds even worse :o
You saw that when trying within "Show More", or same when using the reg tweak mentioned?
I’m wondering what others will do (Explorer++, Notepad++ explorer plugin(s), Double commander et.al.), but when I look into I still see the “classic” IContextMenu here. How does Double Commander behave on Win11?
rpetges:
It seems to be something related with the new Explorer in Windows 11.
My shell extension works fine in Double Commander on Windows 11, I can select hundreds of files and the "classic Windows" context menu is correctly called. Same for Notepad++.
Maybe it's related to the tab bar feature in Explorer ... don't know however if there is a way to disable it for testing.
Navigation
[0] Message Index
[#] Next page