Jump to content
Sign in to follow this  
NCC10281982B

Close all instames of Firefox with batch file

Recommended Posts

At work we have a computer that is used to varify orders. Each time an others barcode is scanned a new instance of Firefox is opened displaying the order. Thus it is common to have many many Brower windows open. In the interest of house keeping I am trying to create a patch bile to close all instances of ff.

 

I have the TSKILL part down but need a loop in the script.

 

Thoughts?

Share this post


Link to post
Share on other sites

On anything other than Windows this is a one liner. :lol:

 

Loops are possible in Windows shell scripts but hell if I know how to do them and query the process list...

Share this post


Link to post
Share on other sites

Create a batch script, and just put this in there:

:loop
tasklist /fi "imagename eq firefox.exe" | find "firefox.exe" >nul && ( taskkill /im firefox.exe >nul & goto loop )

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×