I would like to create a context menu shell extension, to go with a program I write in Python.
I tried to work with a the demo in \Lib\site-packages\win32comext\shell\demos\servers\context_menu.py
from pywin32 (here is the file) but it didn't work on my Win7 x64: It registered alright and added the registry keys, but the context menu didn't show up (even after a reboot). So I searched some more, and remembering that Dropbox saying that use only Python for development, I looked at their context menu registry keys. I found that they used: DropboxExt64.15.dll
in their InProcServer32
(although I've read this and some other resources, I still don't know much about shell extensions). So it looks like they compiled a c/c++ code to a dll and use it to invoke python code.
My question is how did they do it? Where can I find resources (examples, guides, etc.) on how to use this method? What are the flaws of using the method in context_menu.py
?
Your extension needs to be 64 bit to show up in Explorer on Windows 7 x64. So you need to use 64 bit Python and 64 bit pywin32.
Most applications with shell extensions, like Dropbox, install two separate shell extensions, one for 32 bit processes and one for 64 bit processes.
Using 32-bit shell extensions in Windows 7 64-bit
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With