The normal way to do this is to add it to the registry under:
HKEY_LOCAL_MACHINE/Software/Classes/Folder/Shell
However, in your particular case, you want to do some preprocessing before displaying it (for example, in the specified directory), which will not work with a simple registry change.
I think there is a way to get you into any operation and add a hook to it. Now I'm talking about old school knowledge, and I canβt think what technology will be called. I think that, for example, you would, for example, run your way into the rendering engine to put custom skins in regular Explorer windows or add an additional button to the application title bar, as you used to see on the same day.
It just occurred to me that adding a button to the window title could give a starting point for a search, I found this article that refers to subclassing Windows components and overlaying my own behavior. I think this is what I am talking about above:
Hope this will give you a new direction of search.
source share