Page 1 of 1

Kill process with batch

Posted: 20 Aug 2022 07:02
by jebediah
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

Code: Select all

taskkill /F /IM task.exe
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?

Re: Kill process with batch

Posted: 21 Aug 2022 13:37
by ShadowThief
How do you know you're passing the correct executable name to taskkill? Does it appear in tasklist?