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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Gracefully kill all open IE

Status
Not open for further replies.

Mich

IS-IT--Management
Dec 26, 2000
452
US
I own several asp/jsp systems that tend to get, for lack of a better word, "clogged" with cache. When a problem is reported the first response is "Have you closed all browsers and cleared all cookies (CABACAC)?"

Unfortunately many of my users will have a dozen sessions open with mutliple tabs in each and CABACACing can take a while. This gets even more frustrating testing and having to do this over and over and over and over.

So, I'm looking for a vbs that GRACEFULLY closes all open IE sessions. I'm aware of how to kill processes via WMI, but that isn't what I'm looking for as it messes up one of my ASP apps.

Any ideas?

-If it ain't broke, break it and make it better.
 
Use .AppActivate to bring focus to an open IE browser. Then send it an alt+f4 to close it. Not sure if this is considered gracefule, though :/

for multiple IE windows, use a [tt]do while loop[/tt] with some [tt]wscript.sleep[/tt] delays

Code:
set objShell = CreateObject("WScript.Shell")

if (objShell.AppActivate("Internet Explorer")) then
	msgbox "IE is open"
	objShell.SendKeys "%{F4}"
else
	msgbox "IE is not open"
end if

-Geates

"I hope I can chill and see the change - stop the bleed inside and feel again. Cut the chain of lies you've been feeding my veins; I've got nothing to say to you!"
-Infected Mushroom

"I do not offer answers, only considerations."
- Geates's Disclaimer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top