[python-win32] Dispatching something that requires elevation

Tim Roberts timr at probo.com
Sat Jun 9 21:48:28 EDT 2018


On Jun 8, 2018, at 10:11 PM, Simon McConnell <simonmcconnell at gmail.com> wrote:
> 
> I am trying to dispatch a COM interface of a program that is set to "Run as Administrator" in the Compatibility Settings of its properties.  Running the script w/o elevation results in a 'requires elevation' error.  Running the script with elevation results in a 'server execution failed' error, which I understand to be "I can't find that thing". 

No, actually.  That's 0x80080005, which is a DCOM "access denied" error.  Are you quite sure this account has the privileges needed to run this software?


> Removing the "Run as Administrator" from the Compatibility settings and running the script w/o elevation works, but unfortunately, this program needs to be run as administrator.

So, are you saying you don't need elevation to call this server, you only need it for other parts?  Can you spawn the COM access into a separate process?
— 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list