【问题标题】:Why does CreateObject("InternetExplorer.Application") create two iexplorer.exe processes?为什么 CreateObject("InternetExplorer.Application") 创建两个 iexplorer.exe 进程?
【发布时间】:2015-01-21 01:10:59
【问题描述】:

我有一个 vbscript,它使用 InternetExplorer 对象导航到几个页面并将数据传递给这些页面。最近自从修补 IE8 以来,我注意到某些东西导致了僵尸 iexplore.exe 进程的创建。在运行我的脚本并在任务管理器中查看进程列表时,我注意到当我的脚本创建InternetExplorer.Application 对象时,进程列表中出现了两个进程。这是正常行为吗?为什么会这样?我想知道,因为即使在我的测试过程中,当我调用 InternetExplorer 对象的退出方法时,这两个进程似乎都被杀死了,我仍然怀疑这些多个进程是僵尸的根本原因。

这里是一些示例代码:

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

【问题讨论】:

    标签: com vbscript


    【解决方案1】:
    【解决方案2】:

    我在使用 createobject 启动 MsAccess 时遇到了类似的问题。两个进程出现在任务列表中,都通过退出命令消失。

    但是,如果在会话期间出现导致我的程序崩溃的问题,则只有一个进程会被关闭。

    这一定是微软系统的一些功能。

    【讨论】:

      猜你喜欢
      • 2011-02-10
      • 2015-04-19
      • 1970-01-01
      • 2010-12-09
      • 1970-01-01
      • 2013-12-31
      • 2021-11-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多