Windows批处理:终止进程 [英] Windows batch: killing processes
本文介绍了Windows批处理:终止进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有几个运行的具有相同名称的进程.我希望有一个选项可以从批处理脚本中杀死它们.我需要与unix shell命令非常相似的东西:
I have several processes running which have the same name. I want to have an option to kill them from a batch script. I need something very similar to unix shell command:
kill -9 `ps -axuw | grep MY_PROCESS_NAME | awk '{print $2}'`
有什么建议吗?
推荐答案
您可以使用taskkill
.
taskkill /im MY_PROCESS_NAME /f
这将杀死您指定的名称(即iexplore.exe
That will kill all processes under the name you specify i.e. iexplore.exe
在cmd提示符下键入taskkill /?
以获得所有选项.
Type taskkill /?
at a cmd prompt for all the options.
这篇关于Windows批处理:终止进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文