[python-win32] COM registration/unregistration and elevation on Vista
mhammond at skippinet.com.au
Sat Jan 19 00:38:13 CET 2008
> From: python-win32-bounces at python.org [mailto:python-win32-
> bounces at python.org] On Behalf Of Tim Roberts
> Sent: Saturday, 19 January 2008 5:02 AM
> It is possible (since XP) to register a COM object in
> HKEY_CURRENT_USER\Software\Classes instead of
> HKEY_LOCAL_MACHINE\Software\Classes (which is HKEY_CLASSES_ROOT).
> Writing to HKCU should not require elevation. However, as you might
> expect, that results in a COM object that is usable only by the current
Yes, I weaseled my way out of that by saying it was necessary for
installation of "python COM" objects, not "COM objects" ;) Supporting COM
objects in HKCU is probably worthwhile, but IMO is a different problem than
what I was solving, where the assumption is that the user trying to register
it does want it in HKLM, and is capable of doing so once elevated.
> An application with "setup" or "install" or "update" in its filename
> automatically gets elevated. I wonder if it would be possible to
> a clone of Python.exe called PythonSetup.exe and use that for
> registration? I guess that's not really better than your solution.
An alternative there would be to name it anything we like, and give it the
manifest-foo that forces elevation. MS have documented the hacks based on
filenames will go away in the future (yeah, riiiiight :)
> You're right, there are no perfect answers.
In your opinion, is my patch an improvement to the status-quo, or does it
have the potential to cause confusion?
More information about the python-win32