How can I end a process containing a certain keyword, for example
end.process("firefox.exe")
something to that effect.
How can I end a process containing a certain keyword, for example
end.process("firefox.exe")
something to that effect.
try this
import psutil
p_name = "firefox.exe"
for p in psutil.process_iter():
if p.name() == p_name:
p.kill()