我有时会得到一个进程,如果我运行taskkill /im the_process.exe /f /t
,它不会杀死它,因为:
ERROR: The process with PID 6492 (child process of PID 5788) could not be terminated.
Reason: There is no running instance of the task.
但是如果我打开任务管理器并单击结束进程,它就会消失。为什么任务管理器可以工作,而taskkill却不行?我需要能够以编程方式终止该进程,因此我需要找到一个能够成功终止该进程的 CLI 命令。
我已经用谷歌搜索了,但我还没有找到一个可行的解决方案。