prashanthi Posted February 3, 2014 Share Posted February 3, 2014 Hi, May i know whether we could connect to Remote Desktop in Windows through Autoit. If so please suggest the functions for it. Thanks, Prashanthi Pasumamula Link to comment Share on other sites More sharing options...
shai Posted February 3, 2014 Share Posted February 3, 2014 Just run mstsc.exe Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 3, 2014 Moderators Share Posted February 3, 2014 (edited) If you want more than just to execute mstsc, say you need to connect to multiple machines in a business context, you could also embed the rdp client into a GUI. Something like this (barebones example): expandcollapse popup#include <GUIConstants.au3> $oRDP = ObjCreate("MsTscAx.MsTscAx") $mGUI = GUICreate("Embedded RDP", 740, 480, -1 , -1) $GUIActiveX = GUICtrlCreateObj($oRDP, 10, 10, 620, 460) $comp1 = GUICtrlCreateRadio("PC 1", 635, 50, 50, 30) $comp2 = GUICtrlCreateRadio("PC 2", 635, 90, 50, 30) $comp3 = GUICtrlCreateRadio("PC 3", 635, 130, 50, 30) $go = GUICtrlCreateButton("Go", 635, 440, 40, 30) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $go Select Case GUICtrlRead($comp1) = 1 $oRDP.Server = "Computer1" $oRDP.Domain = "DOMAIN" $oRDP.UserName = "USERNAME" $oRDP.Connect() Case GUICtrlRead($comp2) = 1 $oRDP.Server = "Computer2" $oRDP.Domain = "DOMAIN" $oRDP.UserName = "USERNAME" $oRDP.Connect() Case GUICtrlRead($comp3) = 1 $oRDP.Server = "Computer3" $oRDP.Domain = "DOMAIN" $oRDP.UserName = "USERNAME" $oRDP.Connect() EndSelect EndSelect WEnd GUIDelete() Edited February 3, 2014 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now