Contextual Menu to a Specific Folder

894 Views Asked by At

I have read how to add a contextual menu though registry to all files or files according the extension. But how can I add a contextual menu that will work ONLY on files of a specific folder (for example on files of folder C:\contmenu)?

Can this be done?

Thanks a lot.

1

There are 1 best solutions below

0
On BEST ANSWER

If you're implementing a context menu shell extension, you get the path of the item in your IShellExtInit::Initialize() method. Then you can decide depending on the path whether to add your entries to the context menu or not.

It's not possible to register an extension just for a specific path though.