views:

201

answers:

1

Hey guys,

I'm working on a shell extension that is supposed to display extended properties of files (mostly .jpgs) stored on a virtual drive (think of it as an external harddrive).

Is it possible to register the shell extension in a way that it only kicks in for files of a specific folder/drive (in my case the external harddrive) and leaves the handling of jpgs in other folder to the Windows default shell extension?

Regards,

Sebastian

A: 

As far as I have understood the shell extension registration in the registry, there is no such thing as "limit it to a certain folder". Your extension would have to be registered globally, and implemented in a way that simply displays no additional context menu items when not appropriate.

In the registry, shell extensions are bound to file types in the CLASSES_ROOT key. The whole process is designed to be file-centric. So file type resolution is the best you can get. Looking at it, everything else (like path/drive/drive type of a given file) would be too volatile to make basing an extension registration on it a sensible thing.

Tomalak