Running a program as another user on Win32

emuller at emuller at
Tue Nov 9 10:23:51 EST 1999

I am writing a bunch of scripts that will need to run as Administrator
(Domain Administrator) on Windows NT 4.0 workstation clients that
belong to an NT domain. I've tried using LogonUser, but I always get
the following: pywintypes.api_error: (1314, 'LogonUser', ' A required
privilege is not held by the client.'). I've also tried using LogonUser
with the local Administrator account on my NT machine with no luck.

The scripts will be run locally on the system and perform various
tasks. The scripts will be used by service technicians and admins. If I
can't figure out how to do this in Python I'll have to use WinBatch,
which supposedly can do this (Run programs as another user)...

Any ideas how I can do this? Help! I don't want to use winbatch.

Sent via
Before you buy.

More information about the Python-list mailing list