Close IE Browser From Windows Command Line - Techist - Tech Forum

Go Back   Techist - Tech Forum > Computer Software > Microsoft Windows and Software
Click Here to Login
Closed Thread
 
Thread Tools Display Modes
 
Old 01-27-2004, 01:42 PM   #1 (permalink)
Newb Techie
 
Join Date: Jan 2004
Posts: 2
Default Close IE Browser From Windows Command Line

Hello all:

I know that I can open an IE browser from the windows command line. (typing "start iexplore" after the command prompt) But I dont know HOW TO CLOSE ALL OF THE IE BROWSER WINDOWS FROM THE COMMAND LINE.

Can somebody give me some comments/tips? Many thanks in advance...

Winchester
__________________

Zohn_Winchester is offline  
Old 01-27-2004, 01:53 PM   #2 (permalink)
Newb Techie
 
Join Date: Jan 2004
Posts: 2
Default

Thanks, Nix.

But it is not from the command line. I want to write some commands in a batch file. Commands such as open a brower, then execute an exe file to down load some stuff from a website, and finally close the browser. I can realize the first 2 steps, but just dont know how to close the browser...

Winchester
__________________

Zohn_Winchester is offline  
Old 01-27-2004, 02:47 PM   #3 (permalink)
Master Techie
 
Join Date: Oct 2003
Posts: 2,258
Default

There isn't a way to do this that I have been able to find. The only way is to build a script that does it. I have found several Installscripts that work, but nothing that does it for the standard gui...
Good Luck
Inaris is offline  
Old 01-27-2004, 06:31 PM   #4 (permalink)
Newb Techie
 
Join Date: Jan 2004
Posts: 2
Default

Hi,
You can do it with a vbscript from the command line. Paste this into notepad and save as CloseIE.vbs. Everything inbetween the asterisks.
************************
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("SELECT * FROM Win32_Process WHERE Name = 'Iexplore.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
***************************
You can replace iexplore.exe with any process you want. run the script from the commandline and voilla!
joseppi is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 07:01 AM.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.