Vedran Furac vedranf at
Fri Mar 5 12:11:54 CET 2004

On 03 Mar 2004 16:19:48 -0500, David Bolen <db3l at> wrote:
> Vedran Furac <vedranf at> writes:
>> I would like to run a program as another user in win2k. I have runas
>> utility but with this I need type password all the time. Using python and
>> windows extensions it is posibile to write a program that will do this, here
>> is a code:
> It's probably the fact that os.execv is bubbling down into a normal
> CreateProcess call at the win32 API level.  But if the calling process
> is impersonating a user, CreateProcess uses the authentication token
> for the calling process itself, and not the impersonation token.
> There is a CreateProcessAsUser call that works just like

Yes, that was the problem, using CreateProsessAsUser() fixes the problem.

More information about the Python-list mailing list