Jump to content
nanobox1471

Does IE UDF Require Elevated Privileges

Recommended Posts

nanobox1471

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)
        EndIf
    Next
Else
EndIf

Share this post


Link to post
Share on other sites
Danp2

You could add some error checking after each call to one of the _IE functions. You'll need to provide a better description of the issue if you want further input. Which lines are failing? Post the contents of the Scite output window for us to review.

Share this post


Link to post
Share on other sites
nanobox1471

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.

Share this post


Link to post
Share on other sites
Danp2

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.

Share this post


Link to post
Share on other sites
nanobox1471
4 hours ago, Danp2 said:

Is there a change in security zones, such as from the original http to https? If so, that could be the issue.

With more tinkering this seems to be the issue. These errors aren't present on external sites. Thank You.

Share this post


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

×