Re: Stoping IE and removing it from memory
From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 08/06/04
- Next message: Torgeir Bakken \(MVP\): "Re: Run other applications in VBScript"
- Previous message: Roy: "Run other applications in VBScript"
- Next in thread: Richard Bell: "Re: Stoping IE and removing it from memory"
- Reply: Richard Bell: "Re: Stoping IE and removing it from memory"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 06 Aug 2004 16:30:23 +0200
Richard Bell wrote:
> I'm relatively new to WSH and VBSCRIPT. I'm looking for a reliable
> way to stop IE and remove it from memory. When I do an
>
> ie.Quit
>
> IE stops and the visible window is removed from the screen.
> Unfortunately, iexplorer remains in the process list. How do I stop
> it and get it truely out of memory?
>
> Thanks.
Hi
ie.Quit works fine for me, iexplore.exe disappears from the task
list.
To be sure IE is killed, after ie.Quit, you can run this:
sComputer = "." ' use "." for local computer
Set oWmi = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& sComputer & "\root\cimv2")
Set colProcessList = oWmi.ExecQuery _
("Select * from Win32_Process Where Name = 'iexplore.exe'")
For Each oProcess in colProcessList
oProcess.Terminate()
Next
-- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: http://www.microsoft.com/technet/scriptcenter/default.mspx
- Next message: Torgeir Bakken \(MVP\): "Re: Run other applications in VBScript"
- Previous message: Roy: "Run other applications in VBScript"
- Next in thread: Richard Bell: "Re: Stoping IE and removing it from memory"
- Reply: Richard Bell: "Re: Stoping IE and removing it from memory"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|