Great! Works a treat! I think I'll go with the run under system account option.
Tom -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Roger Upole Sent: Wednesday, March 02, 2005 7:49 PM To: python-win32@python.org Subject: [python-win32] Re: win32process user info You should be able to use something like this: th=win32security.OpenProcessToken(handle,win32security.TOKEN_READ) sid=win32security.GetTokenInformation(th,win32security.TokenUser)[0] print win32security.LookupAccountSid('',sid) However, you're going to need to jack up your privileges sky-high or run the script under the SYSTEM account. Otherwise you'll get an Access Denied for most processes that aren't yours. Last time I needed to do something like this, I used the Task Scheduler to run it under the System acct. Running it as a service is another option. Roger _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32 _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32