Jeff M
Jeff M

Reputation: 2563

taskkill doesn't kill process

I will sometimes get a process such that if I run taskkill /im the_process.exe /f /t, then it won't kill it, because: ERROR: The process with PID 6492 (child process of PID 5788) could not be terminated. Reason: There is no running instance of the task.

But if I open Task Manager and click End Process, then it goes away. Why does task manager work but taskkill not? I need to be able to kill the process programically, so I need to find a CLI command that will successfully kill this process.

I've googled around but I haven't found a working solution yet.

Upvotes: 11

Views: 17725

Answers (3)

PTurner
PTurner

Reputation: 21

This is for 'Taskkill /f doesn't kill a process' as well. These are "special circumstances" but I suspect others also operate like I do - remote worker RDPd to an onsite desktop. It won't be everyone's solution but so far is mine and I think worth sharing.

I have been plagued with my Citrix client getting messed up such that I can't open a new session; can't kill wfica32.exe processes - get Access denied or There is no running instance of the task. with tasklist. Tried all the variety of suggestions none of which has worked - always ended up rebooting which of course, is a pain.

But I happened to run Tasklist with /V and the RDP was the clue - I simply disconnected the RDP session I was operating in and reconnected - all the wfica tasks were gone and I could now reopen my Citrix session.

wfica32.exe                  63636 RDP-Tcp#16

Upvotes: 0

BenV136
BenV136

Reputation: 369

Also, if are debugging the process under Visual Studio, you will get this exact situation. You need to detach the debugger or terminate the process from the debugger.

Upvotes: 1

Monofuse
Monofuse

Reputation: 827

I just had the exact same issue, while programming a piece of software in codeblocks.

It ended up being that Codeblocks was still debugging it, and I had to press the red play button (F8) on the top menu to continue. Check to make sure no other programming is linked to your app.

Upvotes: 0

Related Questions