开发者

Why does CreateObject("InternetExplorer.Application") create two iexplorer.exe processes?

I have a vbscript using the InternetExplorer object to navigate to a few pages and passing data to those pages. Recently since patchi开发者_开发技巧ng IE8 I've noticed that something is causing the creation of zombie iexplore.exe processes. While running my script and watching the process list in task manager I noticed that when my script creates the InternetExplorer.Application object, two processes appear in the process list. Is this normal behavior? Why does this happen? I'm wondering because even though during my testing it appears both of these processes get killed when I call the InternetExplorer object's quit method, I still suspect that these multiple processes are the root cause of the zombies.

Here is some sample code:

Set ie = CreateObject("InternetExplorer.Application")

ie.Navigate2 "Address"
ie.AddressBar = 1 
ie.Toolbar = 1 
ie.StatusBar = 1 
ie.Width = 600 
ie.Height = 400 
ie.Left = 300 
ie.Top = 150    
ie.Visible = 1

Do While ie.Busy
        WScript.Sleep 1
Loop

ie.Navigate2 "Address?variable=value"

Do While ie.Busy
        WScript.Sleep 1
Loop

...rest of code...
ie.Quit
Set ie = Nothing


I would guess that IE is putting the tab and the browser window in separate processes.


I have a similar issue when using createobject to start MsAccess. Two processes appear in the task list and both go away with the quit command.

However if some problem occurs during the session that causes my program to crash only one of the processes gets shutdown.

This must be some Microsoft system feature.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜