任何方式编写Windows .bat文件终止进程? [英] Any way to write a Windows .bat file to kill processes?

查看:186
本文介绍了任何方式编写Windows .bat文件终止进程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以每次我把我的公司所拥有的开发机器上的时间我要杀死10+使用任务管理器或任何其他的流程管理应用程序只是为了获得不俗的表现出我的IDE的过程。是的,这些都是我公司在我的机器上安装的安全性和合规性计划的进程。我想要做的是有一些,我可以只断火杀有问题的进程的.bat文件或脚本。

So every time I turn on my company owned development machine I have to kill 10+ processes using the task manager or any other process management app just to get decent performance out of my IDE. Yes, these are processes from programs that my company installs on my machine for security and compliance. What I'd like to do is have a .bat file or script of some kind that I can just fire off and kill the processes in question.

任何人都已经知道如何做到这一点?

Anybody already know how to do this?

推荐答案

您可以用'TASKKILL做到这一点。随着/ IM参数,可以指定图像的名称。例如:

You can do this with 'taskkill'. With the /IM parameter, you can specify image names. Example:

TASKKILL / IM somecorporateprocess.exe

taskkill /im somecorporateprocess.exe

您也可以做到这一点,以力必杀:

You can also do this to 'force' kill:

TASKKILL / F / IM somecorporateprocess.exe

taskkill /f /im somecorporateprocess.exe

只需添加每次你想杀死,保存为.bat文件,并把在你的启动目录过程中1线。问题解决了!

Just add 1 line per process you want to kill, save as a .bat file, and put in in your startup directory. Problem solved!

如果这是一个遗留系统, PsKill 将这样做。

If this is a legacy system, PsKill will do the same.

这篇关于任何方式编写Windows .bat文件终止进程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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