Windows – TaskKill very slow

servicewindows

I have a batch file which uses taskkill to stop several services. The commands look like this:

taskkill /s \\myServer /f /fi "Services eq MyService"

The problem is that each command takes a really long time (around 1 minute). Since there are several such commands, the batch file is really slow.

Is there any way to speed up taskkill?

Best Answer

Try using sc stop instead of killing the service. It's a preferred method.

http://technet.microsoft.com/en-us/library/cc742107(WS.10).aspx

Related Topic