How to associate a directory with my application

I do not want to bind the extension, but the folder. Therefore, when I click "Desktop" to indicate the OS to use my application, and not "Explorer".

I tried replacing the explorer.exe command in HKEY_CLASSES_ROOT \ Folder \ shell \ open \ with my program, but it does not work properly, so I open the control panel and other things with my application, which is not what I want.

Thanks!

+4
source share
2 answers

What you want to do can be achieved by implementing a custom IShellFolder . http://msdn.microsoft.com/en-us/library/windows/desktop/cc144093(v=vs.85).aspx contains information. At a minimum you should implement

  • IPersistFolder Interface
  • IShellFolder Interface
  • IEnumIDList Interface

Here's what, for example, Google Drive uses

+5
source

Folder ProgID designates any folders, including not file. The correct ProgID for your case is Directory .

Link

0
source

Source: https://habr.com/ru/post/1387233/


All Articles