Welcome to WebmasterWorld Guest from 54.147.63.124

Forum Moderators: incrediBILL

Message Too Old, No Replies

shutting down firefox/IE from the command-line

how to?

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

Junior Member

10+ Year Member

joined:Aug 4, 2004
posts:84
votes: 0


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]

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

Senior Member

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

joined:Feb 25, 2002
posts:3185
votes: 0


Interesting one. Sounds like you need to use something like pskill - but you'll need to know the PID....
5:18 pm on Mar 8, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 17, 2002
posts:1181
votes: 5


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

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

Preferred Member

10+ Year Member

joined:June 3, 2002
posts:566
votes: 0


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"
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members