Jump to content

Passing domain credential to intranet site.


Recommended Posts

In the past, I use RUNAS to pass domain credential to an internal website.  Recent policy changes required that access to the website must not have any menu access, and I cannot use KIOSK mode.  My solution is to embed the site with the following modified sample code from the AutoIT examples.  The problem now is that I cannot figure out how to pass primary domain credential to the site like how I previously did with RUNAS.  Below is a sanitized version of the code I am using.  Any suggestions and tips are much appreciated!  

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
$sUsername = ""
$sPassword = ""
$sTicketNumber = ""

Opt('MustDeclareVars', 1)

RunIE()

Func RunIE()
    Local $oIE, $GUIActiveX, $msg
    $oIE = ObjCreate("Shell.Explorer.2")
    GUICreate("CMS Update Ticket", 1000, 800, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN))
    $GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 980, 750)
    $oIE.navigate("https://www.yahoo.com")
    GUISetState()
    While 1
        $msg = GUIGetMsg()
        Select
            Case $msg = $GUI_EVENT_CLOSE
                Exit
        EndSelect
    WEnd
EndFunc   ;==>RunIE

 

Edited by LisHawj
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...