Jump to content

Does IE UDF Require Elevated Privileges

Recommended Posts

I'm new to AutoIt and programming/scripting in general and have been having some trouble getting scripts I create on my personal machine to run the same on my work computer. I'm running windows 10 enterprise on both machines and Functions like _IENavigate and _IETagNameGetCollection don't seem to read the DOM when executed on my work computer, unless I run it with Administrative permissions I haven't been able to get around this. I've been unsuccessful searching the forum and google for this particular issue. Any Suggestions?

#include <IE.au3>
#include <Array.au3>
#include <String.au3>

$asset = InputBox("PC Search", "Search by AM", "", "", 100, 120)
If @error = 0 Then
    $oIE = _IECreate("http://mypc.org/PeekabooApi/peek/assets/assettags/" & $asset & "?Min=2&", 0, 0)

    $h4 = _IETagNameGetCollection($oIE, "h4")

    For $title In $h4
        If IsObj($title) Then
            Local $arr = StringSplit($title.innerhtml, "", 2)
            $string = _ArrayToString($arr, "", 11, 24, "", 11, 24)
            InputBox("Search Results", "Found String", $string, "", 100, 120)
Link to post
Share on other sites

On the machine without administrative permissions the console outputs the following errors:

>"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "F:\Scripts\Servicedesk\pc_lookup.au3"    
--> IE.au3 T3.0-2 Error from function _IELoadWait, $_IESTATUS_ClientDisconnected (-2147417848, Browser has been deleted prior to operation.)
--> IE.au3 T3.0-2 Error from function _IETagNameGetCollection, $_IESTATUS_InvalidObjectType
"F:\Scripts\Servicedesk\pc_lookup.au3" (31) : ==> Variable must be of type "Object".:
For $title In $h4
For $title In $h4^ ERROR
>Exit code: 1    Time: 9.469

It seems that after the _IECreate Object is created, the rest of the script is unable to detect that object, but again only happens when executed as a standard user.

Link to post
Share on other sites

Is there a change in security zones, such as from the original http to https? If so, that could be the issue. Try reattaching to the browser with _IEAttach before continuing your script. If you search the forum for this error ($_IESTATUS_ClientDisconnected) you will likely find other discussions on this issue.

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...