[python-win32] Question: Finding the "owner" Of A Process
bendra at gmail.com
Thu Aug 31 23:43:07 CEST 2006
Hi John I had the same problem recently except I'm using windows XP home
but it should work the same.
The trick is that you cannot access the method directly by calling it as for
some reason process.GetOwner is an integer 0 (perhaps the return code
of the method or something). What you have to do is use the execMethod_
so your code would look something like this:
for proc in procs:
result = proc.execMethod_('GetOwner')
print "%s's owner is %s" % (proc.Name, result.User)
And similar replacements with the other calls to GetOwner.
execMethod_ returns an object with two feilds User and domain.
Hope this is what you were looking for
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-win32