Reputation: 1485
I have a process in which i am running a batch file which opens 1 browser. eg "start iexplore.exe www.google.com" this will open ie with google on it. and in other line i am running the same cmd with link to some other site "start iexplore.exe www.stackoverflow.com"
Now the situation is i want to Kill only www.google.com using batch file, with taskkill option or if any other option is there.
Please help.
Upvotes: 2
Views: 17280
Reputation: 4291
taskkill /FI "WINDOWTITLE eq Google*"
This one will kill all the processes (e.g.: IE, Chrome, etc..) with title starts with "Google".
If you run start iexplore.exe www.google.com
a new IE window will open Google and the title will be "Google".
You can also be more specific to kill only Internet Explorer processes:
taskkill /IM iexplore.exe /FI "WINDOWTITLE eq Google*
There are other filters and options you can use with taskkill
. Check out the help taskkill /?
Upvotes: 9