Jump to content
Sign in to follow this  

AutoIt & Vmware Webclient Autologin

Recommended Posts

I am struggling to get autologon to work on the VMware webclient webpage. We use this script for other site without a problem. But I am struggling for this website. logon.au3
I have also attached the VMware client webpage.html for your assistance.
The section I am struggling with is as follows it is not clear what variable I am to type.  Any ideas or direction would be great
I have tried
Checked against chrome but not sure what to use.
local $_UserNameBoxName = "type:text"
 local $_PasswordBoxName = "type:password"
    local $_WebFormName = "loginForm"
 ; BlockAllInput()

Func LoginProcess()
 LogWrite("Entered LoginProcess()")
 ; References to HTML elements in the login process
local $_UserNameBoxName = "type:text"
 local $_PasswordBoxName = "type:password"
    local $_WebFormName = "loginForm"
 ; BlockAllInput()
 ; Check if there is a certificate Error
 If (IsCertificateErrorPage($g_IEInstance)) Then
 ; Make IE visible to user
    _IEAction($g_IEInstance, "visible")
 ; ------------------
 ; Handle login here (User Name, Password and Address are in the Relevant Parameters)
 ; Insert the Login Steps for the Connection Component
 ; Use $TargetUserName for the User Name
 ; Use $TargetPassword for the Users Password, ext.
 ; If more parameters are needed, edit the FetchSessionProperties Function below
 ; ------------------
 ; Using Non-Form based Login parameters
 ;~ ================================== ;

    Dim $oLoginForm = _IEFormGetObjByName($g_IEInstance, $_WebFormName)
 ; Login form not found
 If ($oLoginForm = 0) Then
  MsgBox(0, StringFormat("Can't find requested form named [%s] (Extra details: %d, %d)", $_WebFormName, -1004)
 local $oUser = _IEFormElementGetObjByName($oLoginForm, $_UserNameBoxName)
 local $oPass = _IEFormElementGetObjByName($oLoginForm, $_PasswordBoxName)
 _IEFormElementSetValue($oUser, $g_pTargetUsername)
 _IEFormElementSetValue($oPass, $g_pTargetPassword)
 ; Login
 local $hndl = _IEPropertyGet($g_IEInstance, "hwnd")
    LogWrite("finished LoginProcess() successfully")

vmware client webpage.html

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
Sign in to follow this