[python-win32] killProcName.py not working for processes under user SYSTEM

Gerrat Rickert grickert at coldstorage.com
Tue May 2 21:50:49 CEST 2006


I'm logged in as an administrator on my computer (actually a domain
admin) and I can't seem to get the killProcName.py program (that came
with Mark Hammond's python extensions) to kill ANY process owned by
'SYSTEM' (I've tried a few - eg. 'iPodService', 'Apache')

 

I can open the windows task manager, right-click the process and do an
'End Process', and that kills it just fine, but I just get an error when
I try it from Python:

(5, 'OpenProcess', 'Access is denied.')

 

[ it fails at: handle = win32api.OpenProcess(win32con.PROCESS_TERMINATE,
0,pids[0]) ]

...I can print the pid, and it corresponds to the expected PID in
Windows Task Manager

 

I'm running WinXP SP2 if that matters.

 

...when I check who I'm logged in as using (win32api.GetDomainName(),
win32api.GetUserName()), it shows that I'm the domain admin that I
expect.  

...I've tried running the command prompt as various users  (local admin,
a power user), and I just can't get it to kill the process.

 

 

Any Suggestions?

 

Thanks,

Gerrat Rickert

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20060502/8505b124/attachment.htm 


More information about the Python-win32 mailing list