Killing processes on win32

Graham Ashton graham.ashton at cis.co.uk
Thu Jan 3 05:01:26 EST 2002


Hi.

I've run into a bit of a brick wall when trying to kill a process on
win98. I've read the killProcName.py script that comes with the win32
extensions, and have seen how it uses win32pdhutil to get a list of
process IDs that can be passed into win32api.OpenProcess().

That would be great, if only I had the win32pdh library on this
platform. When I import win32pdhutil I get an ImportError as win32pdh
isn't found (I'm using 1.5.2c1. Yes, I know. Unfortunately it's way
beyond my control).

I don't know of any way to get a handle to a process other than
passing a pid to win32api.OpenProcess(). I've not started this process
from within the script.

So what I'm looking for is an alternative way of killing a process.
I've got kill.exe from the win98 resource kit, but it doesn't kill
this particular process. :(

Any thoughts?

--
Graham



More information about the Python-list mailing list