views:

1940

answers:

7

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?

+4  A: 

Download PSKill. Write a batch file that calls it for each process you want dead, passing in the name of the process for each.

Shog9
+1  A: 

There are several solutions, that once installed can be called from a batch file.

http://technet.microsoft.com/en-us/sysinternals/bb896683.aspx

is one example.

sdg
+10  A: 
taskkill /f /im "devenv.exe"

this will forcibly kill the pid with the exe name "devenv.exe"

equivalent to -9 on the nix'y kill command

DevelopingChris
+4  A: 

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

taskkill /im somecorporateprocess.exe

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

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

Factor Mystic
+1  A: 

Use Powershell! Built in cmdlets for managing processes. Examples here (hard way), here(built in) and here (more).

slipsec
+2  A: 

I'm assuming as a developer, you have some degree of administrative control over your machine. If so, from the command line, run msconfig.exe. You can remove many processes from even starting, thereby eliminating the need to kill them with the above mentioned solutions.

Jason Z
+2  A: 

Get Autoruns from Mark Russinovich, the Sysinternals guy that discovered the Sony Rootkit... Best software I've ever used for cleaning up things that get started automatically.

Brian Stewart