Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

close all iexplorer windows

Status
Not open for further replies.

MartDawg

Programmer
Jan 14, 2004
33
US
I have a script that opens up some browsers, when i'm done I need to close all the broswers. ie.quit only closes the initial broswer I opened. Not all the broswers on my screen.

Is there a way to kill iexplore or close all ie windows running?
 
Search this forum for something like 'kill process'.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Hello MartDawg,

You can use wmi service to terminate all iexplorer instances.
Code:
set svc=getobject("winmgmts:root\cimv2")
sQuery="select * from win32_process where name='iexplore.exe'"
for each oproc in svc.execquery(sQuery)
    oproc.terminate
next
set svc=nothing
regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top