Jump to content
Sign in to follow this  

Remote desktop control

Recommended Posts


Hi i am new to Autoit but i am liking it :) i come from hardawre backgrond recently thought of automating some of tasks in IXIA through remote access here is the code below

$host = "" ;<<<<<<< enter here the host name or ip address

$pass = "0312016"

;Remote Desktop ActiveX Control Interfaces -> http://msdn.microsoft.com/en-us/library/aa383022(v=VS.85).aspx

$hGUI = GUICreate("RDP Embedded Sessions", 952, 675, -1, -1, $WS_OVERLAPPEDWINDOW + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN)

$oRDP = ObjCreate("MsTscAx.MsTscAx.2") ;http://msdn.microsoft.com/en-us/library/aa381344(v=VS.85).aspx

$oRDP_Ctrl = GUICtrlCreateObj($oRDP, 64, 44, 800, 600)

GUICtrlSetResizing(-1, $GUI_DOCKALL)

GUICtrlSetStyle($oRDP_Ctrl , $WS_VISIBLE)

$oRDP.DesktopWidth = 800

$oRDP.DesktopHeight = 600

$oRDP.Fullscreen = False

$oRDP.ColorDepth = 16

$oRDP.AdvancedSettings3.SmartSizing = True

$oRDP.Server = $host

$oRDP.UserName = "ixia" ;<<<<<<< enter here the user name

$oRDP.Domain= ""

$oRDP.AdvancedSettings2.ClearTextPassword = $pass

$oRDP.ConnectingText = "Connecting to " & $host

$oRDP.DisconnectedText = "Disconnected from " & $host

$oRDP.StartConnected = True


GUISetState(@SW_SHOW, $hGUI)

;Func ixia()


;ShellExecute("netsh", 'interface ip set address name="Local Area Connection 2" static 1')

$oShel = ObjCreate("shell.application")

$oShel_Ctrl = GUICtrlCreateObj($oShel, 64, 44, 800, 600)

GUICtrlSetStyle($oShel_Ctrl , $WS_VISIBLE)



$oShel.ShellExecute("IxExplorer.exe","","C:\Program Files\Ixia\IxOS\6.00-EA-Patch1\", "open", 1);


;~ ConsoleWrite($oRDP.GetErrorDescription() & @CRLF)

While 1

$nMsg = GUIGetMsg()

Switch $nMsg






The problem is after opening the session i am not able to perform any tasks the tasks which i intend to do gets openend in my sys itself :P

please guide me as i have serious time contraints to finish the job

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