Jump to content


Photo
- - - - -

Close all instames of Firefox with batch file


  • Please log in to reply
8 replies to this topic

#1 NCC10281982B

NCC10281982B

    I am so done.

  • Moderator
  • PipPipPipPipPipPip
  • 6966 posts
  • Gender:Male
  • Location:Bellevue, WA

Posted 08 July 2015 - 08:29 AM

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?
I am DUMB, okay? Dumb as a post! Think I'm happy about it?
 
sigimage.gifCFr15LujaQwHZgiAc222zw.png

#2 Waco

Waco

    Lab Rat 2

  • Reviewer
  • PipPipPipPipPipPipPipPip
  • 16508 posts
  • Gender:Male
  • Location:Los Alamos, NM

Posted 08 July 2015 - 07:36 PM

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...
Tolerance is a sign of weakness.

#3 IVIYTH0S

IVIYTH0S

    They call me... General Help.

  • Members
  • PipPipPipPipPipPipPipPip
  • 21620 posts
  • Gender:Male
  • Location:South, NJ

Posted 09 July 2015 - 03:11 AM

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

"GilliumX58" DESKTOP
Mobo: Asus P8Z68-V-PRO | Processor: Intel Core i7 2600K @ 4.6ghz | CPU Cooler: Zalman CNPS9900MAXR | Videocard: ASUS GTX970 Strix
Memory: Patriot/Kingston 16GB 1866mhz | OS SSD: SanDisk Extreme 240GB SATA | PSU: PC Power & Cooling Silencer 750W
Monitor: Samsung 30" 305T | CD/DVD: Samsung SH-S223F | Keyboard: Sentey Phoenix | Mouse: Razer Lachesis

OCC Cool Club Member

 
 

Rebate Success Thread 2015---RMA Success Thread 2016---GPU Comparison tool on AnAndTech


#4 bishop245

bishop245

    So broke I can't even pay attention.

  • Moderator
  • PipPipPipPipPipPipPip
  • 10004 posts
  • Gender:Male
  • Location:Oklahoma

Posted 09 July 2015 - 02:22 PM

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

Sounds easiest



#5 NCC10281982B

NCC10281982B

    I am so done.

  • Moderator
  • PipPipPipPipPipPip
  • 6966 posts
  • Gender:Male
  • Location:Bellevue, WA

Posted 11 July 2015 - 09:09 AM

No gentlmen the task manager is not what I want to use.
I am DUMB, okay? Dumb as a post! Think I'm happy about it?
 
sigimage.gifCFr15LujaQwHZgiAc222zw.png

#6 IVIYTH0S

IVIYTH0S

    They call me... General Help.

  • Members
  • PipPipPipPipPipPipPipPip
  • 21620 posts
  • Gender:Male
  • Location:South, NJ

Posted 11 July 2015 - 04:19 PM

Ctrl-Esc and the Del on firefox process is really that hard?

"GilliumX58" DESKTOP
Mobo: Asus P8Z68-V-PRO | Processor: Intel Core i7 2600K @ 4.6ghz | CPU Cooler: Zalman CNPS9900MAXR | Videocard: ASUS GTX970 Strix
Memory: Patriot/Kingston 16GB 1866mhz | OS SSD: SanDisk Extreme 240GB SATA | PSU: PC Power & Cooling Silencer 750W
Monitor: Samsung 30" 305T | CD/DVD: Samsung SH-S223F | Keyboard: Sentey Phoenix | Mouse: Razer Lachesis

OCC Cool Club Member

 
 

Rebate Success Thread 2015---RMA Success Thread 2016---GPU Comparison tool on AnAndTech


#7 Waco

Waco

    Lab Rat 2

  • Reviewer
  • PipPipPipPipPipPipPipPip
  • 16508 posts
  • Gender:Male
  • Location:Los Alamos, NM

Posted 11 July 2015 - 04:22 PM

http://stackoverflow...tch-script-loop

And if you can query the process list, you can just loop until you've killed them all.
Tolerance is a sign of weakness.

#8 El_Capitan

El_Capitan

    Even the sun goes down

  • Members
  • PipPipPipPipPipPip
  • 7174 posts
  • Gender:Male
  • Location:Somerville, MA

Posted 11 July 2015 - 05:39 PM

It's pretty easy, I'll give details later tonight, or tomorrow morning.



#9 El_Capitan

El_Capitan

    Even the sun goes down

  • Members
  • PipPipPipPipPipPip
  • 7174 posts
  • Gender:Male
  • Location:Somerville, MA

Posted 13 July 2015 - 01:01 PM

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 )