Kill process with batch
Posted: 20 Aug 2022 07:02
Hi guys.
I've been trying to kill a process with a batch file but it seems like neither batch or Powershell works.
There's no problem with killing the process via taskmanager.
Here's what i've tried
If i put a pause in the code it just says
ERROR: The process "task.exe" with PID 9204 could not be terminated
Reason: No instance of activity is running
I've tried taskkill with the PID as well and that gave me same error.
Any ideas what i'm doing wrong here?
I've been trying to kill a process with a batch file but it seems like neither batch or Powershell works.
There's no problem with killing the process via taskmanager.
Here's what i've tried
Code: Select all
taskkill /F /IM task.exe
ERROR: The process "task.exe" with PID 9204 could not be terminated
Reason: No instance of activity is running
I've tried taskkill with the PID as well and that gave me same error.
Any ideas what i'm doing wrong here?