Killing processes using TerminateProcess()
-
Hi, I'd like to know how to kill a known process without knowing its process id. For example, if I have a process listed in the taskmanager process list as "bad_process", can I use the string "bad_process" as input to some function in order to get a handle on that process to kill it? Any help would be appreciated. Many thanks in advance. Sincerely, Jonathan.
-
Hi, I'd like to know how to kill a known process without knowing its process id. For example, if I have a process listed in the taskmanager process list as "bad_process", can I use the string "bad_process" as input to some function in order to get a handle on that process to kill it? Any help would be appreciated. Many thanks in advance. Sincerely, Jonathan.
There is a Kill.exe util that comes with some resource kits that takes a process name, internally looks up the process id and then calls terminate process using that id. MSDN has the sample project that builds this tool and shows you how to look up the process id based on title. You can get the sample here[^].
-
There is a Kill.exe util that comes with some resource kits that takes a process name, internally looks up the process id and then calls terminate process using that id. MSDN has the sample project that builds this tool and shows you how to look up the process id based on title. You can get the sample here[^].
Many thanks Erik! That is all I need for my purposes. Cheers, Jonathan.