Jump to content

Browser has been deleted prior to operation

Recommended Posts


Any code I try to use that runs internet explorer, I notice that the either the browser object or the PID is changed shortly after the loading of the browser.

#include <IE.au3>
$oIE = _IECreate ("https://myserver/officescan")

_IELoadWait ($oIE)

Results into the following log entry

>"C:\temp\autoIT\autoit-v3\SciTe\..\autoit3.exe" /ErrorStdOut "C:\temp\IE_loadWait.au3"    
--> IE.au3 T3.0-2 Error from function _IELoadWait, $_IESTATUS_ClientDisconnected (-2147023179, Browser has been deleted prior to operation.)
--> IE.au3 T3.0-2 Error from function _IELoadWait, $_IESTATUS_InvalidObjectType ()
We should be logged in
--> IE.au3 T3.0-2 Error from function _IELoadWait, $_IESTATUS_InvalidObjectType ()
>Exit code: 0    Time: 10.41

If you start internet explorer like this

Local $sProgramToRun = "C:\Program Files\Internet Explorer\iexplore.exe"
    Local $sHomeDrivePath = "C:\Program Files\Internet Explorer\"
    Local $iPID = Run($sProgramToRun & "https://gdcvmav03.rwgroup.org:4343/officescan", $sHomeDrivePath, @SW_SHOWMAXIMIZED)
    ConsoleWrite(StringFormat("PID = %s", $iPID, @error)& @CRLF )

And inspect the task manager, in most cases you see multiple PID with iexplorer.exe showing up and the one you created disappears.

That is exactly what also happens when you use _IECreate. The $oIE is no longer valid, so anything you try to do afterwards is not working.

How can I control this? Could some one provide me with a working code sample, showing how to deal with this?

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...