I want to kill a process ONLY IF the process exists, I want to do this because I have a tool that runs only if there is no error and I made some tests and indeed there is an error when I try to kill a process that doesn't exists. This is the line I use to kill a process:
taskkill /f /IM notepad.exe
But I want to validate it only executes when the process EXISTS.
Thank you!!!
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.