Question

I have some windows namespace shell extension for folder view. I want to use it for user interaction with files having particular file extension. Those files are created by other my application.

How to perform proper it's proper registration in windows registry. Should I add some key for file extension with CLSID of my extension and extension itself or something else?

Was it helpful?

Solution

You must register in this registry locations:

[HKEY_CLASSES_ROOT\.yourextension]
@="CLSID\\{Your namespace extension CLSID}"

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}]
@="Test File"

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}\CLSID]
@="{Your namespace extension CLSID}"

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}\DefaultIcon]
@="yourdll.dll,0"

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}\Implemented Categories]

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}\Implemented Categories\{00021490-0000-0000-C000-000000000046}]

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}\InProcServer32]
@="yourdll.dll"
"ThreadingModel"="Apartment"

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}\shell]

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}\shell\explore]

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}\shell\explore\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,45,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,2e,00,65,00,78,00,\
  65,00,20,00,2f,00,65,00,2c,00,2f,00,69,00,64,00,6c,00,69,00,73,00,74,00,2c,\
  00,25,00,49,00,2c,00,25,00,4c,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}\shell\explore\ddeexec]
@="[ExploreFolder(\"%l\", %I, %S)]"
"NoActivateHandler"=""

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}\shell\explore\ddeexec\application]
@="Folders"

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}\shell\explore\ddeexec\ifexec]
@="[]"

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}\shell\explore\ddeexec\topic]
@="AppProperties"

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}\shell\find]
"SuppressionPolicy"=dword:00000080

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}\shell\find\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,45,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,2e,00,65,00,78,00,\
  65,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}\shell\find\ddeexec]
@="[FindFolder(\"%l\", %I)]"

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}\shell\find\ddeexec\application]
@="Folders"

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}\shell\find\ddeexec\topic]
@="AppProperties"

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}\shell\open]

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}\shell\open\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,45,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,2e,00,65,00,78,00,\
  65,00,20,00,2f,00,69,00,64,00,6c,00,69,00,73,00,74,00,2c,00,25,00,49,00,2c,\
  00,25,00,4c,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}\shell\open\ddeexec]
@="[ViewFolder(\"%l\", %I, %S)]"
"NoActivateHandler"=""

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}\shell\open\ddeexec\application]
@="Folders"

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}\shell\open\ddeexec\ifexec]
@="[]"

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}\shell\open\ddeexec\topic]
@="AppProperties"

[HKEY_CLASSES_ROOT\CLSID\{Your namespace extension CLSID}\ShellFolder]
"Attributes"=dword:680001a0

For possible Attributes values see SFGAO values.

Also dont forgot add your CLSID to the Approved shell extensions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top