I want a python script that terminate an aplications when I RUN another program. Example: if I run vlc media player that will close kodi.exe Or any other options to do this ?
Asked
Active
Viewed 68 times
1 Answers
0
It seems to me that what you have to do is enumerate processes by name, determine which to kill, and then kill it (the last part may be cumbersome a bit).
Did you have a chance to look at the following questions and their answers (they illustrate how to handle all of the steps above)?

sophros
- 14,672
- 11
- 46
- 75
-
thank you ! I've used taskkill command and the subprocess.Popen command to open program it did work though but did try another program to taskkill but it doesn't kill the program.. – fun_dogg Oct 09 '17 at 17:47
-
Good to know it worked for you. Could you please indicate this marking the reply? Thank you. – sophros Oct 11 '17 at 11:01