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

Can't you just open task manager and end the task?

Sounds easiest

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...