Is there a command line utility that kills all processes with a specific command line?
E.g. kill all processes named "java.exe" with a command line that contains "-jar selenium-server.jar". This is possible through process explorer.
Answer
In Windows XP, you can do this easyly uing WMIC, the WMI Console. From a command propt, type the following:
wmic Path win32_process Where "CommandLine Like '%-jar selenium-server.jar%'" Call Terminate
Edit:
I replaced the alias 'process' by it full path ('path win32_process') as is Aviator's port. This alias may not be declared on every OS.
No comments:
Post a Comment