subprocess and win32security.ImpersonateLoggedOnUser

Emin.shopper Martinian.shopper emin.shopper at
Mon Jun 1 10:29:16 EDT 2009

> The source for subprocess just uses CreateProcess. Which means that,
> short of monkey-patching it, you're going to have to roll your own
> subprocess-like code (I think). Basically, you'll need to run
> CreateProcessAsUser or CreateProcessAsLogonW. They're both a bit
> of a pig in terms of getting the right combination of parameters
> and privileges,

Thanks. I tried rolling my own via CreateProcessAsUser but it
complained about needing some special permissions so its probably not
going to work. I'd like to try CreateProcessAsLogonW but can't see how
to access that via python. I will start a new thread on the
python-win32 list about that.


More information about the Python-list mailing list