Windows – Add Menu Item to Context Menu for Specific Directory

context menuwindowswindows-registry

Similar to https://stackoverflow.com/questions/2123762/add-menu-item-to-windows-context-menu-only-for-specific-filetype

Is is possible to add menu item to windows context menu only for directory than contain specific child directory?

Use case: display context menu for directory if and only if the directory contains child directory named .git/ (directly, i.e. not in subdirectory).

Thanks is advance.

Best Answer

https://docs.microsoft.com/en-us/windows/win32/shell/handlers

So a context menu extension runs before the menu is shown allowing it to show/hide itself. It also get told about double clicks on the file and can take over the Open verb if so configured.

To see what you can do without programming see https://docs.microsoft.com/en-us/windows/win32/shell/context.

Related Question