There is a good way to interact with the Windows Explorer shell for .NET Framework (see https://github.com/dwmkerr/sharpshell#shell-context-menus).
Is that approach from ShareShell (interacting through COM servers) still the correct way for a new .NET6 or .NET7 application targeting Windows 10 and Windows 11 only?
Looking at https://learn.microsoft.com/en-us/windows/win32/shell/context-menu, is it the right entry point to implement?
I didn't found any nuget package or other site describing a good solution for the current .NET and Windows platforms.
I would prefer a solution without COM if there is one because my knowledge related to COM is limited.
CodePudding user response:
A classic static verb can be added without writing code, just add it to the registry:
HKCR\.myext\=myextfile
HKCR\myextfile\shell\open\command\="c:\apps\myapp.exe" "%1"
To appear in the new menu in Windows 11 you have to implement the IExplorerCommand
COM object and you have to be a packaged app with identity.
CodePudding user response:
I will try the provided extensions from https://github.com/dahall/Vanara as a first step.
Some links I found: