0

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.

asked Jan 17, 2020 at 9:01

2 Answers 2

1

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.

answered Jan 18, 2020 at 19:49
0

Based on other comments this is not possible without native context handler.

For C# this project https://github.com/dwmkerr/sharpshell can be used to create the native context handler.

answered Jan 19, 2020 at 11:46

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.