I have created an myprogram.exe file using the command
pyinstaller --onefile myprogram.py
I am trying to stop the execution of exe file using
import os
os.system("taskkill /im myprogram.exe")
But no luck. 1. Can any help me how can i stop the execution of exe file? 2. Also is it possible to find the already running python exe files?
Try forcing the command.
"TASKKILL /F /IM myprogram.exe"
NOTE: You can verify whether you exe is running or not by issuing "TASKLIST"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.