简体   繁体   中英

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. 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.

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.

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.

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

Getting same issue, but for chrome. Chrome's been playing up for a while, but windows doesn't (seem to) have an equivalent to SIGKILL that just kills without asking questions:

taskkill /IM chrome.exe /T /F ERROR: The process with PID 9624 (child process of PID 2164) could not be terminated. Reason: There is no running instance of the task.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM