Adding menu items to explorer context menu fails in Windows 10
Using the example provided via
pywin32/com/win32comext/shell/demos/servers/context_menu.py
has no effect to the explorer context menu under win 10. The registry keys are created correctly but AFAIK the methods in the ShellExtension extension class from the above demo never get called.
Failed to find a solution to the problem.
64bit windows and 64bit Python?
Yup, both are 64bit.
Python 3.6.6 [MSC v.1900 64 bit (AMD64)]
Is it installed "globally"? The dll paths in the registry probably need to be pointing to ones in the system32 directory. Other than that though, I've no idea.
Yes, it's not a venv, it's the regular system-wide windows python install. Pywin32 came with it.
What dll paths are you talking about exactly?
The added registry entries will point to pythoncomxx.dll - if that's not in system32, there's a good chance explorer.exe will not be able to locate it and everything it depends on.
There is NO such .dll-file in C:\Windows\system32.
What do you recommend? Should I reinstall pywin32? Pip or binary installer?
@mhammond:
Update:
To be on the safe side, I reinstalled Python (globally) and pywin32. I also manually ran pywin32_postinstall. pythoncom36.dll is now present in c:\windows\system32 - but to no avail.
The context menu extension still doesn't work.
Is there anything else I need to do besides executing "python context_menu.py --register"?
That should be all that's necessary. I've never tried that demo on windows 10, so something might have changed.
I'm experiencing a potentially similar issue finding pythoncom36.dll in an ArcPro default python environment that comes with pywin32 and many/most dependent packages installed.
I'm trying to import a 3rd party package for ActiveDirectory support - PYAD - and it seems to find all it's pywin32 packages in the ArcPro system install except pythoncom36.dll. I do have this file on the sys.path, but it can't seem to find it there!
This is windows 10, ArcPro 2.4.4 and 2.7.4... no changes to the python environment and packages provided by Pro...
Lots of banging head against the wall, and it seems like this thread is related! Any updates discovered in the last few years with respect to Windows 10?
THanks!
You should probably try and remove everything pywin32 related which is installed by ArcPro, then install pywin32 via the .exe installer - this will ensure the core files are in system32, which is often needed for explorer integration (as changes to your PATH in your command-prompt etc typically aren't available in explorer)
Interesting suggestion - thank you for the reply! I'm not quite certain if that's possible - at least it doesn't seem to be in my heavily locked down machine environment. I'll look into that a bit more though! My broad goal is to be able to leverage the pywin32 functions without having to do an admin based installation (Again, locked down environment) - and I was hopeful that the Pro installation would be functional so I can share code around to users with just Pro installed without having to involve administrators to install more software. (Maybe out of luck!)
I also did wonder if having had pywin32 installed via the .exe alongside prior ArcMap (python2.7) installations (all still installed actually), might be confusing the paths. I did test that on a machine that has only ever had Pro installed, and no prior versions of ArcMap or pywin32 - but it also failed on this same file. So, I may look at discussing this with Esri to see if its an oversight on their part that could be adjusted, and will also see about removing packages from a clone of the Pro env to get it working!
Thanks for the feedback!
On Thu, Jul 22, 2021 at 7:10 PM Mark Hammond @.***> wrote:
You should probably try and remove everything pywin32 related which is installed by ArcPro, then install pywin32 via the .exe installer - this will ensure the core files are in system32, which is often needed for explorer integration (as changes to your PATH in your command-prompt etc typically aren't available in explorer)
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mhammond/pywin32/issues/1265#issuecomment-885336201, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH7ZZJUG7MEIYCI2G3ZWMODTZC6RRANCNFSM4F6UNSZA .