Jump to content

(solved see final post) IE object creation failing


Recommended Posts

Hey all.  So I have a script that is meant to use the IE UDF to launch a hidden IE browser to a specific site.  Of course the script does more than that, but I can't get it to actually launch an IE session, the console just returns this over and over when I try to run it:

> IE.au3 T3.0-2 Error from function _IECreate,  (Browser Object Creation Failed)

Below is the code, however I am not sure how much it will help.  How do errors like this occur?  Any info would be appreciated.
 

#include <Zip.au3>
#include <File.au3>
#include <IE.au3>

Opt("WinTitleMatchMode", 2)
$oie = _IECreate ( "www.google.com", Default, 0 )
_IELoadWait ( $oie )

Don't know if this will help, but I am using the Windows 10 pro creators update x64 and restarting computer did not help

Edited by whiggs
Link to comment
Share on other sites

1 hour ago, Danp2 said:

Have you tried other variations of _IECreate to determine if they also give this error? Post the output from Scite with each of the following changes --

$oie = _IECreate ( "www.google.com")
$oie = _IECreate ( "www.google.com", 1, 1)

 

So yeah, I tried different variations of the command, and I tried the versions you gave.  The first command gave the same error listed in the original post:

> IE.au3 T3.0-2 Error from function _IECreate,  (Browser Object Creation Failed)

 

The last command gave two preceding errors then the same last error:

-> IE.au3 T3.0-2 Warning from function _IEAttach, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler)
--> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch
--> IE.au3 T3.0-2 Error from function _IECreate,  (Browser Object Creation Failed)

 

Link to comment
Share on other sites

What is the output from this?

#include <IE.au3>

Global $oCOMErrorHandler = ObjEvent("AutoIt.Error", _User_ErrFunc)

Local $oIE = _IECreate ("www.google.com")

Func _User_ErrFunc($oError)
    ; Do anything here.
    ConsoleWrite(@ScriptFullPath & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _
            @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _
            @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _
            @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _
            @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _
            @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _
            @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _
            @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _
            @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _
            @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF)
EndFunc   ;==>_User_ErrFunc

 

Link to comment
Share on other sites

 

On 4/14/2017 at 10:50 AM, Danp2 said:

What is the output from this?

#include <IE.au3>

Global $oCOMErrorHandler = ObjEvent("AutoIt.Error", _User_ErrFunc)

Local $oIE = _IECreate ("www.google.com")

Func _User_ErrFunc($oError)
    ; Do anything here.
    ConsoleWrite(@ScriptFullPath & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _
            @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _
            @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _
            @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _
            @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _
            @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _
            @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _
            @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _
            @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _
            @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF)
EndFunc   ;==>_User_ErrFunc

 

Hello sir.  Sorry for the delay in getting back to you.  I decided to completely re-install os to see if that would work.  The odd thing is it did, for maybe half a day, then the same issue cropped up again!!  So, in response to your previous request, here is the output that I received when I ran the above code:

C:\Users\whiggs\Desktop\d.au3 (215) : ==> COM Error intercepted !
    err.number is:         0x80040154
    err.windescription:    Class not registered

    err.description is:     
    err.source is:         
    err.helpfile is:     
    err.helpcontext is:     
    err.lastdllerror is:     0
    err.scriptline is:     215
    err.retcode is:     0x00000000

 

Can someone explain how I can resolve this issue?  It would appear that the IE class is not registered, though I am not sure what that really means or how to resolve it.

Link to comment
Share on other sites

Try:

#include <IE.au3>
Global $oCOMErrorHandler = ObjEvent("AutoIt.Error", _User_ErrFunc)
OnAutoItExitRegister("_OnExit")
_ProcessClose("iexplore.exe", 1)

Local $oIE = _IECreate("www.google.com", 0, 0, 1, 1)
MsgBox(32, "AutoIt", @error ? "IECreate Error" : "IECreate OK")

Func _User_ErrFunc($oError)
;~     ; Do anything here.
    ConsoleWrite(@ScriptFullPath & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _
            @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _
            @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _
            @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _
            @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _
            @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _
            @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _
            @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _
            @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _
            @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF)
EndFunc   ;==>_User_ErrFunc

Func _OnExit()
    _ProcessClose("iexplore.exe", 1)
EndFunc   ;==>_OnExit

Func _ProcessClose($sProcess, $All = 0)
    Local $sPID = ProcessExists($sProcess)
    If Not $sPID Then Return SetError(0, 1, 0)
    Dim $Q = 0
    If $All Then
        While ProcessExists($sProcess)
            ProcessClose($sProcess)
            Sleep(1)
            $Q += 1
            If $Q > 10 Then ExitLoop
        WEnd
        If ProcessExists($sProcess) Then RunWait(@ComSpec & " /c taskkill /T /F /IM " & $sProcess, @SystemDir, @SW_HIDE)
    Else
        While ProcessExists($sPID)
            ProcessClose($sPID)
            Sleep(1)
            $Q += 1
            If $Q > 10 Then ExitLoop
        WEnd
        If ProcessExists($sPID) Then RunWait(@ComSpec & " /c taskkill /T /F /PID " & $sPID, @SystemDir, @SW_HIDE)
    EndIf
    Return SetError(0, 0, ProcessExists($sPID) = 0)
EndFunc   ;==>_ProcessClose
; * -----:|

 

Regards,
 

Link to comment
Share on other sites

6 minutes ago, Trong said:

Try:

#include <IE.au3>
Global $oCOMErrorHandler = ObjEvent("AutoIt.Error", _User_ErrFunc)
OnAutoItExitRegister("_OnExit")
_ProcessClose("iexplore.exe", 1)

Local $oIE = _IECreate("www.google.com", 0, 0, 1, 1)
MsgBox(32, "AutoIt", @error ? "IECreate Error" : "IECreate OK")

Func _User_ErrFunc($oError)
;~     ; Do anything here.
    ConsoleWrite(@ScriptFullPath & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _
            @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _
            @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _
            @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _
            @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _
            @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _
            @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _
            @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _
            @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _
            @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF)
EndFunc   ;==>_User_ErrFunc

Func _OnExit()
    _ProcessClose("iexplore.exe", 1)
EndFunc   ;==>_OnExit

Func _ProcessClose($sProcess, $All = 0)
    Local $sPID = ProcessExists($sProcess)
    If Not $sPID Then Return SetError(0, 1, 0)
    Dim $Q = 0
    If $All Then
        While ProcessExists($sProcess)
            ProcessClose($sProcess)
            Sleep(1)
            $Q += 1
            If $Q > 10 Then ExitLoop
        WEnd
        If ProcessExists($sProcess) Then RunWait(@ComSpec & " /c taskkill /T /F /IM " & $sProcess, @SystemDir, @SW_HIDE)
    Else
        While ProcessExists($sPID)
            ProcessClose($sPID)
            Sleep(1)
            $Q += 1
            If $Q > 10 Then ExitLoop
        WEnd
        If ProcessExists($sPID) Then RunWait(@ComSpec & " /c taskkill /T /F /PID " & $sPID, @SystemDir, @SW_HIDE)
    EndIf
    Return SetError(0, 0, ProcessExists($sPID) = 0)
EndFunc   ;==>_ProcessClose
; * -----:|

 

So a message box popped up and Said "IEcreate error: and the console displayed the following:

--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
C:\Users\whiggs\Desktop\d.au3 (215) : ==> COM Error intercepted !
    err.number is:         0x80040154
    err.windescription:    Class not registered

    err.description is:     
    err.source is:         
    err.helpfile is:     
    err.helpcontext is:     
    err.lastdllerror is:     0
    err.scriptline is:     215
    err.retcode is:     0x00000000

--> IE.au3 T3.0-2 Error from function _IECreate,  (Browser Object Creation Failed)
+>09:30:49 AutoIt3.exe ended.rc:0
+>09:30:49 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 10.25

Link to comment
Share on other sites

Try:

#include <IE.au3>
Global $oCOMErrorHandler = ObjEvent("AutoIt.Error", _User_ErrFunc)
OnAutoItExitRegister("_OnExit")
_CheckIEobject()

Local $oIE = _IECreate("www.google.com", 0, 0, 1, 1)
MsgBox(32, "AutoIt", @error ? "IECreate Error" : "IECreate OK")

Func _User_ErrFunc($oError)
;~     ; Do anything here.
    ConsoleWrite(@ScriptFullPath & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _
            @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _
            @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _
            @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _
            @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _
            @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _
            @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _
            @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _
            @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _
            @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF)
EndFunc   ;==>_User_ErrFunc

Func _CheckIEobject()
    DllCall("kernel32.dll", "int", "Wow64EnableWow64FsRedirection", "int", 0)
    DllCall("kernel32.dll", "int", "Wow64DisableWow64FsRedirection", "int", 1)

    Local $ExplorerFrame3264 = @WindowsDir & '\System32\ExplorerFrame.dll'
    Local $ExplorerFrame86 = @WindowsDir & '\SysWOW64\ExplorerFrame.dll'

    RunWait(@ComSpec & "/c regsvr32 /s ExplorerFrame.dll", @SystemDir)
    RunWait(@ComSpec & '/c regsvr32 /s "' & $ExplorerFrame3264 & '"', @SystemDir)
    RunWait(@ComSpec & '/c regsvr32 /s "' & $ExplorerFrame86 & '"', @SystemDir)

    _ProcessClose("iexplore.exe", 1)
    If @error Then Exit MsgBox(48, "/!\", "Your System has eat by Virus or Coruped!")
EndFunc   ;==>_CheckIEobject


Func _OnExit()
    _ProcessClose("iexplore.exe", 1)
EndFunc   ;==>_OnExit

Func _ProcessClose($sProcess, $All = 0)
    Local $sPID = ProcessExists($sProcess)
    If Not $sPID Then Return SetError(0, 1, 0)
    Dim $Q = 0
    If $All Then
        While ProcessExists($sProcess)
            ProcessClose($sProcess)
            Sleep(1)
            $Q += 1
            If $Q > 10 Then ExitLoop
        WEnd
        If ProcessExists($sProcess) Then RunWait(@ComSpec & " /c taskkill /T /F /IM " & $sProcess, @SystemDir, @SW_HIDE)
    Else
        While ProcessExists($sPID)
            ProcessClose($sPID)
            Sleep(1)
            $Q += 1
            If $Q > 10 Then ExitLoop
        WEnd
        If ProcessExists($sPID) Then RunWait(@ComSpec & " /c taskkill /T /F /PID " & $sPID, @SystemDir, @SW_HIDE)
    EndIf
    Return SetError(ProcessExists($sPID), 0, ProcessExists($sPID) = 0)
EndFunc   ;==>_ProcessClose
; * -----:|

GoodLucky

Regards,
 

Link to comment
Share on other sites

5 minutes ago, Trong said:

Try:

#include <IE.au3>
Global $oCOMErrorHandler = ObjEvent("AutoIt.Error", _User_ErrFunc)
OnAutoItExitRegister("_OnExit")
_CheckIEobject()

Local $oIE = _IECreate("www.google.com", 0, 0, 1, 1)
MsgBox(32, "AutoIt", @error ? "IECreate Error" : "IECreate OK")

Func _User_ErrFunc($oError)
;~     ; Do anything here.
    ConsoleWrite(@ScriptFullPath & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _
            @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _
            @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _
            @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _
            @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _
            @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _
            @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _
            @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _
            @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _
            @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF)
EndFunc   ;==>_User_ErrFunc

Func _CheckIEobject()
    DllCall("kernel32.dll", "int", "Wow64EnableWow64FsRedirection", "int", 0)
    DllCall("kernel32.dll", "int", "Wow64DisableWow64FsRedirection", "int", 1)

    Local $ExplorerFrame3264 = @WindowsDir & '\System32\ExplorerFrame.dll'
    Local $ExplorerFrame86 = @WindowsDir & '\SysWOW64\ExplorerFrame.dll'

    RunWait(@ComSpec & "/c regsvr32 /s ExplorerFrame.dll", @SystemDir)
    RunWait(@ComSpec & '/c regsvr32 /s "' & $ExplorerFrame3264 & '"', @SystemDir)
    RunWait(@ComSpec & '/c regsvr32 /s "' & $ExplorerFrame86 & '"', @SystemDir)

    _ProcessClose("iexplore.exe", 1)
    If @error Then Exit MsgBox(48, "/!\", "Your System has eat by Virus or Coruped!")
EndFunc   ;==>_CheckIEobject


Func _OnExit()
    _ProcessClose("iexplore.exe", 1)
EndFunc   ;==>_OnExit

Func _ProcessClose($sProcess, $All = 0)
    Local $sPID = ProcessExists($sProcess)
    If Not $sPID Then Return SetError(0, 1, 0)
    Dim $Q = 0
    If $All Then
        While ProcessExists($sProcess)
            ProcessClose($sProcess)
            Sleep(1)
            $Q += 1
            If $Q > 10 Then ExitLoop
        WEnd
        If ProcessExists($sProcess) Then RunWait(@ComSpec & " /c taskkill /T /F /IM " & $sProcess, @SystemDir, @SW_HIDE)
    Else
        While ProcessExists($sPID)
            ProcessClose($sPID)
            Sleep(1)
            $Q += 1
            If $Q > 10 Then ExitLoop
        WEnd
        If ProcessExists($sPID) Then RunWait(@ComSpec & " /c taskkill /T /F /PID " & $sPID, @SystemDir, @SW_HIDE)
    EndIf
    Return SetError(ProcessExists($sPID), 0, ProcessExists($sPID) = 0)
EndFunc   ;==>_ProcessClose
; * -----:|

GoodLucky

That action that occurred and the console output did not change at all.  Same as post #7

Link to comment
Share on other sites

Well, this is interesting.  I decided to follow the instructions I found here (scroll to solution 2), and ran "regsvr32 ExplorerFrame.dll" in elevated command prompt, and an error window popped up with the following content:

The module "ExplorerFrame.dll" was loaded but the entry-point DllRegisterServer was not found.

Make sure that "ExplorerFrame.dll" is a valid DLL or OCX file and then try again.

What does this mean?  Anybody have an idea?

Edit: Trong, I would be more inclined to re-install the os if I hadn't spent all day yesterday backing up my files and reinstalling the os.  Since this OS is less than a day old, reinstalling the os is not going to happen again.

Edited by whiggs
Link to comment
Share on other sites

Turn on settings:

1. Enable unsigned ActiveX controls for the current zone 
Tools > Internet Options > Security > Custom level... 
Enable "ActiveX Controls and plug-ins" > "Initialize and script ActiveX controls not marked as safe for scripting" 

2.Allow Active Content to run files 
Tools > Internet Options > Advanced > Security Enable "Allow Active Content to run in files on My Computer" 

** Make sure to close all your IE browser windows.

And try again:

#RequireAdmin
#include <IE.au3>
Global $oCOMErrorHandler = ObjEvent("AutoIt.Error", _ObjComError)

_ProcessClose("iexplore.exe", 1)
If @error Then Exit MsgBox(48, "/!\", "Your System has been eaten by Viruses or Corrupted!!")
OnAutoItExitRegister("_OnExit")

Local $oIE = _IECreate("www.google.com", 0, 0, 1, 1)
MsgBox(32, "AutoIt", @error ? "IECreate Error" : "IECreate OK")

Func _ObjComError($oError)
;~     ; Show Error
    ConsoleWrite("!" & @ScriptFullPath & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _
            "! " & @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _
            "! " & @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _
            "! " & @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _
            "! " & @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _
            "! " & @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _
            "! " & @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _
            "! " & @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _
            "! " & @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _
            "! " & @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF)
EndFunc   ;==>_ObjComError

Func _OnExit()
    _ProcessClose("iexplore.exe", 1)
EndFunc   ;==>_OnExit

Func _ProcessClose($sProcess, $All = 0)
    Local $sPID = ProcessExists($sProcess)
    If Not $sPID Then Return SetError(0, 1, 0)
    Dim $Q = 0
    If $All Then
        While ProcessExists($sProcess)
            ProcessClose($sProcess)
            Sleep(1)
            $Q += 1
            If $Q > 100 Then ExitLoop
        WEnd
        If ProcessExists($sProcess) Then RunWait(@ComSpec & " /c taskkill /T /F /IM " & $sProcess, @SystemDir, @SW_HIDE)
    Else
        While ProcessExists($sPID)
            ProcessClose($sPID)
            Sleep(1)
            $Q += 1
            If $Q > 100 Then ExitLoop
        WEnd
        If ProcessExists($sPID) Then RunWait(@ComSpec & " /c taskkill /T /F /PID " & $sPID, @SystemDir, @SW_HIDE)
    EndIf
    $sPID = ProcessExists($sProcess)
    Return SetError($sPID ? 1 : 0, 0, $sPID ? 0 : 1)
EndFunc   ;==>_ProcessClose
; * -----:|

 

P/S: What your OS version? OS Arch ? IE Version ?  Autoit version? ?

Regards,
 

Link to comment
Share on other sites

22 hours ago, Trong said:

Turn on settings:

1. Enable unsigned ActiveX controls for the current zone 
Tools > Internet Options > Security > Custom level... 
Enable "ActiveX Controls and plug-ins" > "Initialize and script ActiveX controls not marked as safe for scripting" 

2.Allow Active Content to run files 
Tools > Internet Options > Advanced > Security Enable "Allow Active Content to run in files on My Computer" 

** Make sure to close all your IE browser windows.

And try again:

#RequireAdmin
#include <IE.au3>
Global $oCOMErrorHandler = ObjEvent("AutoIt.Error", _ObjComError)

_ProcessClose("iexplore.exe", 1)
If @error Then Exit MsgBox(48, "/!\", "Your System has been eaten by Viruses or Corrupted!!")
OnAutoItExitRegister("_OnExit")

Local $oIE = _IECreate("www.google.com", 0, 0, 1, 1)
MsgBox(32, "AutoIt", @error ? "IECreate Error" : "IECreate OK")

Func _ObjComError($oError)
;~     ; Show Error
    ConsoleWrite("!" & @ScriptFullPath & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _
            "! " & @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _
            "! " & @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _
            "! " & @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _
            "! " & @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _
            "! " & @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _
            "! " & @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _
            "! " & @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _
            "! " & @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _
            "! " & @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF)
EndFunc   ;==>_ObjComError

Func _OnExit()
    _ProcessClose("iexplore.exe", 1)
EndFunc   ;==>_OnExit

Func _ProcessClose($sProcess, $All = 0)
    Local $sPID = ProcessExists($sProcess)
    If Not $sPID Then Return SetError(0, 1, 0)
    Dim $Q = 0
    If $All Then
        While ProcessExists($sProcess)
            ProcessClose($sProcess)
            Sleep(1)
            $Q += 1
            If $Q > 100 Then ExitLoop
        WEnd
        If ProcessExists($sProcess) Then RunWait(@ComSpec & " /c taskkill /T /F /IM " & $sProcess, @SystemDir, @SW_HIDE)
    Else
        While ProcessExists($sPID)
            ProcessClose($sPID)
            Sleep(1)
            $Q += 1
            If $Q > 100 Then ExitLoop
        WEnd
        If ProcessExists($sPID) Then RunWait(@ComSpec & " /c taskkill /T /F /PID " & $sPID, @SystemDir, @SW_HIDE)
    EndIf
    $sPID = ProcessExists($sProcess)
    Return SetError($sPID ? 1 : 0, 0, $sPID ? 0 : 1)
EndFunc   ;==>_ProcessClose
; * -----:|

 

P/S: What your OS version? OS Arch ? IE Version ?  Autoit version? ?

Still the same issue.  Operating system is Windows 10 Creators update edition that was released just 2 weeks ago (Microsoft Windows [Version 10.0.15063]), so the version of Internet explorer that I am using is also the latest.  Autoit I am using is also the latest.  Is there anybody out there is is able to successfully create an IE object within autoit and manipulate successfully in the Windows 10 creators update?  I am starting to think this is more of a Windows problem than an Autoit problem, as trying to create a IE object in powershell results in the following error:

new-object : Retrieving the COM class factory for component with CLSID 
{0002DF01-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. 
(Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).
At line:1 char:7
+ $ie = new-object -ComObject "InternetExplorer.Application"
+       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-Object], UnauthorizedAccessException
    + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.NewObjectComm 
   and

 

Yet, when I check the registry key for that CLSID item, the administrators group (which I am a member of, has read access to the key......  I don't know what I am missing here.....

Link to comment
Share on other sites

This may be a dumb question, but... Did you try to turn off your AV software ?

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

  • 2 weeks later...

For those who are interested...I found the issue.  It was the application Sandboxie.  According to the changelog, starting in version 5.18, " Creation of IE embedded application objects are blocked by default."  So if you are running the latest official release of Sandboxie, you will be unable to script with IE, so I recommend updating to their latest beta release, which no longer blocks the creation of IE embedded application objects by default.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...