SUPPORTTI 1 Posted January 17 Share Posted January 17 I have this script working OK I have been looking for a week how to add the terminal server port Default port 3389 Change to by 53899 where to add the port in this script with default port works normal Exemplo: 172.16.16.1:53899 expandcollapse popup#include <GUIConstantsEx.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> $host = "172.16.16.1" ;<<<<<<< insira aqui o nome do host ou endereço IP ;Remote Desktop ActiveX Control Interfaces -> http://msdn.microsoft.com/en-us/ library/aa383022(v=VS.85).aspx $hGUI = GUICreate("CONEXAO CLIENTE REMOTO", 952, 675, -1, -1, $WS_OVERLAPPEDWINDOW + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN) $oRDP = ObjCreate("MsTscAx .MsTscAx") ;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 = 1366 $oRDP.DesktopHeight = 768 $oRDP.Fullscreen =768 $oRDP.ColorDepth = 32 $oRDP.AdvancedSettings2.RedirectDrives = Verdadeiro; Apenas as impressoras de baixa qualidade foram $ oRDP.AdvancedSettings2.RedirectPrinters = True ; Apenas o Drucker mitgenommen foi usado $oRDP.AdvancedSettings2.RedirectPorts = False ; Portas como LPT1 etc $oRDP.AdvancedSettings2.RedirectSmartCards = False ; SmartCards para Autenticação $oRDP.AdvancedSettings2.EnableAutoReconnect = False $oRDP.AdvancedSettings2.allowBackgroundInput = False $oRDP.AdvancedSettings2.ConnectionBarShowRestoreButton = False $oRDP.AdvancedSettings3.SmartSizing = True $oRDP.AdvancedSettings5.AudioRedirectionPasswordMode = 0 $oRDPCleartingTextword2. "Senha " ; <<<<<<< digite aqui a senha do usuário $oRDP.AdvancedSettings8.EnableCredSspSupport = true $oRDP.Server = $host $oRDP.UserName = "Administrador" ;<<<<<<< insira aqui o nome de usuário $oRDP.Domain = "CLIENTE.LOCAL" ;<<< <<<< insira aqui o nome do domínio $oRDP.ConnectingText = "Conectando a CLIENTE REMOTO " $oRDP.DisconnectedText = "Desconectado de CLIENTE REMOTO" $oRDP.StartConnected = True $oRDP.Connect() GUISetState(@SW_SHOW, $hGUI) ;~ ConsoleWrite($oRDP.GetErrorDescription() & @CRLF) Enquanto 1 $nMsg = GUIGetMsg() Alternar $nMsg Caso $GUI_EVENT_CLOSE $oRDP.Disconnect() Sair EndSwitch WEnd SOLVE-SMART 1 Link to post Share on other sites
Developers Jos 2,811 Posted January 17 Developers Share Posted January 17 Moved to the appropriate AutoIt General Help and Support forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums. Moderation Team SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to post Share on other sites
SUPPORTTI 1 Posted January 17 Author Share Posted January 17 16 minutes ago, Jos said: Movido para o fórum de ajuda e suporte geral do AutoIt apropriado , como o fórum de discussão geral do desenvolvedor afirma claramente: Equipe de Moderação Peço desculpa mas por está tudo inglês fiquei um pouco pedido vou me atenta mas sobre isso Link to post Share on other sites
Solution Danp2 1,360 Posted January 17 Solution Share Posted January 17 (edited) 1 hour ago, SUPPORTTI said: Exemplo: 172.16.16.1:53899 Have you tried using this format as the value for $host? Edit: Looks like you can use AdvancedSettings2.RDPPort to supply the alternate port number. Edited January 17 by Danp2 WebDriver UDF [GH&S] Latest version Wiki FAQs Link to post Share on other sites
SUPPORTTI 1 Posted January 17 Author Share Posted January 17 45 minutes ago, Danp2 said: Você já tentou usar este formato como valor para $host? Edit: Parece que você pode usar AdvancedSettings2 .RDP P o r t para fornecer o número de porta alternativo . Yes, I tried to do $host 172.16.16.53899 and it was not the command you said, it would be like this $oRDP.AdvancedSettings2.RDPPort = “53899” $oRDP.AdvancedSettings2.RDPPort = $port Thanks for the help, I'm very new to ours and I'm asking for RSS but I already liked it lol Link to post Share on other sites
argumentum 905 Posted January 17 Share Posted January 17 1 hour ago, SUPPORTTI said: $oRDP.DesktopWidth = 1366 $oRDP.DesktopHeight = 768 What you can do is to build a RDP file and run it. Follow the link to see my signature's stuff.FAQ - Please Read Before Posting. Link to post Share on other sites
SUPPORTTI 1 Posted January 17 Author Share Posted January 17 17 minutes ago, argumentum said: O que você pode fazer é criar um arquivo RDP e executá-lo. How to do this? Can you help me? Link to post Share on other sites
Developers Jos 2,811 Posted January 17 Developers Share Posted January 17 @SUPPORTTI, Please stop qouting each comment and if you need to quote then only English Please! Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to post Share on other sites
SUPPORTTI 1 Posted January 17 Author Share Posted January 17 expandcollapse popup#include <GUIConstantsEx.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> $host = "172.16.16.100" ;<<<<<<< enter here the host name or ip address $port = "53899" ;Remote Desktop ActiveX Control Interfaces -> http://msdn.microsoft.com/en-us/library/aa383022(v=VS.85).aspx $hGUI = GUICreate("CONEXAO ROGERIO AUTO CENTER", 952, 675, -1, -1, $WS_OVERLAPPEDWINDOW + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN) $oRDP = ObjCreate("MsTscAx.MsTscAx") ;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 = 1366 $oRDP.DesktopHeight = 768 $oRDP.Fullscreen =768 $oRDP.ColorDepth = 32 $oRDP.AdvancedSettings2.RedirectDrives = True ; Sollen die Laufwerke mitgenommen werden $oRDP.AdvancedSettings2.RedirectPrinters = True ; Sollen die Drucker mitgenommen werden $oRDP.AdvancedSettings2.RedirectPorts = False ; Ports wie LPT1 etc $oRDP.AdvancedSettings2.RedirectSmartCards = False ; SmartCards für Authentifizierung $oRDP.AdvancedSettings2.EnableAutoReconnect = False $oRDP.AdvancedSettings2.allowBackgroundInput = False $oRDP.AdvancedSettings2.ConnectionBarShowRestoreButton = False $oRDP.AdvancedSettings3.SmartSizing = True $oRDP.AdvancedSettings5.AudioRedirectionMode = 0 $oRDP.AdvancedSettings2.ClearTextPassword = "Password" ; <<<<<<< enter here the user password $oRDP.AdvancedSettings8.EnableCredSspSupport = true $oRDP.AdvancedSettings2.RDPPort = $port $oRDP.Server = $host $oRDP.UserName = "Administrador" ;<<<<<<< enter here the user name $oRDP.Domain = "CLIENTE.LOCAL" ;<<<<<<< enter here the domain name $oRDP.ConnectingText = "Conectando a CLIENTE RDP " $oRDP.DisconnectedText = "Desconectado de CLIENTE RDP " $oRDP.StartConnected = True $oRDP.Connect() GUISetState(@SW_SHOW, $hGUI) ;~ ConsoleWrite($oRDP.GetErrorDescription() & @CRLF) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE $oRDP.Disconnect() Exit EndSwitch WEnd Passing by to inform you that I found the solution thanks to the friends above thank you all very much. argumentum 1 Link to post Share on other sites
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