Welcome to WebmasterWorld Guest from 50.19.156.133

Forum Moderators: incrediBILL

Message Too Old, No Replies

shutting down firefox/IE from the command-line

how to?

     

macdar

12:45 pm on Mar 8, 2006 (gmt 0)

10+ Year Member



Hello,

I want to run scheduled tasks on a windows machine on hourly basis. This task should run some scripts in firefox or IE.

this guy loads the script:
"C:\Program Files\Mozilla Firefox\firefox.exe" http://localhost/cron.php
and works fine..

But, can you guys tell me what's the command-line to shut down the firefox or IE browser browser from the command line?

Thanks.

[edited by: encyclo at 1:26 pm (utc) on Mar. 8, 2006]
[edit reason] delinked [/edit]

BlobFisk

5:11 pm on Mar 8, 2006 (gmt 0)

WebmasterWorld Senior Member blobfisk is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Interesting one. Sounds like you need to use something like pskill - but you'll need to know the PID....

Frank_Rizzo

5:18 pm on Mar 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You may want to consider a macro script such as provided by autohotkey.

You can set a script to open a window, wait a while and then close it, or close it after a certain response. This one starts ie, waits 5 seconds and then closes the window even if something else took focus in between.

#Persistent
winset,alwaysontop,on
run, iexplore.exe htp: // localhost/cron.php
sleep,5000
WinActivate,My Cron Results Page #match the page Title here
WinClose,My Cron Results Page #match the page Title here

bull

9:15 pm on Mar 8, 2006 (gmt 0)

10+ Year Member



Using the Command Line Process Viewer/Killer/Suspender for Windows NT/2000/XP (type this into your favorite search engine), you could simply kill the process with "process -k firefox.exe" or "process -k iexplore.exe"
 

Featured Threads

Hot Threads This Week

Hot Threads This Month