[python-win32] Finding and Exiting a Process
Lewis Franklin
lewis.franklin at gmail.com
Mon Sep 20 18:43:05 CEST 2004
I just answered my own question:
pid = self.get_pid('iexplore') # Cedric's function
hp = win32api.OpenProcess(win32con.PROCESS_ALL_ACCESS,0, pid[0])
win32process.TerminateProcess(hp, 0)
Thanks and sorry for the spam.
Lewis
On Mon, 20 Sep 2004 12:16:19 -0400, Lewis Franklin
<lewis.franklin at gmail.com> wrote:
> Note to self: Do not write emails at 3am...
>
> Ok, thanks to Cedric I now have both the process name and ID. However,
> I have now realized that I have no idea how to terminate that program.
> Am I able to terminate an application by only knowing the process
> name/ID?
>
> Lewis
>
More information about the Python-win32
mailing list