windows 如何在Windows 8中使用cmd按进程名称杀死程序?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/29227208/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 19:00:20  来源:igfitidea点击:

how to kill a program by process name using cmd in windows 8?

windowsprocesscmduidtaskkill

提问by Patrioticcow

it seems that whenever i open a program in windows 8, the process name is WWAHost.exe

似乎每当我在 Windows 8 中打开一个程序时,进程名称是 WWAHost.exe

i would like to be able to do something like TASKKILL /F /IM notepad.exeand terminate a specific process by name

我希望能够执行类似操作TASKKILL /F /IM notepad.exe并按名称终止特定进程

if i kill WWAHost.exethen all open programs will die.

如果我杀了WWAHost.exe那么所有打开的程序都会死。

any ideas?

有任何想法吗?

回答by

You can kill the process andall its children (ie. all processes started by it) using the /tswitch:

您可以使用开关终止进程及其所有子进程(即由它启动的所有进程)/t

taskkill /f /t /im wwahost.exe


See the documentation for taskkill(ss64) and tskill(ss64) system utilities.

请参阅taskkill( ss64) 和tskill( ss64) 系统实用程序的文档。