使用taskkill/F终止进程,返回代码0 [英] Killing a process with taskkill /F returning code 0

查看:284
本文介绍了使用taskkill/F终止进程,返回代码0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要杀死Windows进程(java.exe).我当前正在使用:

I need to kill a windows process (java.exe). I'm currently using:

taskkill.exe /F /IM java.exe

我需要使用/F选项,因为这是关键过程,但是通过这种方式,我得到的是返回码1,而我需要返回代码0(当我不使用/F杀死其他非关键过程时返回)

I need to use the /F option since is a critical process,but in this way I get a return code 1 instead I need a return code 0 (returned when I don't use /F for killing other not critical processes)

我该如何解决这个问题?

how could I fix this problem?

非常感谢

推荐答案

您可以尝试:

TASKKILL /F /IM "notepad.exe"

您可以在.访问此博客也是如此.

这篇关于使用taskkill/F终止进程,返回代码0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆