Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do a taskkill in cmd based on the partial content of the windowtitle name? [closed]

I am starting a command window with "start "DUMMYCOMMANDWINDOW" I am able to close the window with "taskkill /FI "WINDOWTITLE EQ DUMMY*" /f /t" But I want to close the window based on partial name of the window title, as in, "taskkill /FI "WINDOWTITLE EQ *COMMANDWINDOW" /f /t". How do I do this??

like image 746
user3701327 Avatar asked Jun 03 '14 17:06

user3701327


1 Answers

following command kills all the process that starts with 'chrom'.

taskkill /f /im chrom*

/f: force (use this from a cmd prompt in admin mode only) /im: image name

I hope you are familiar with wildcards

You can refer to following MSDN article

like image 117
Neha Avatar answered Oct 20 '22 02:10

Neha