Jump to content

Pass Password to RemoteDesktop session


Recommended Posts

Hi

I've wrote a script to logon remote on my servers.

I want to send the password also to server. so the logon must be done automatically.

I've used this code: 

$oRDP = ObjCreate("MsTscAx.MsTscAx")
   GUICreate($SerName, @DesktopWidth-50, @DesktopHeight-70)
   $GUIActiveX = GUICtrlCreateObj($oRDP, 5, 5, @DesktopWidth-60, @DesktopHeight-80)

   GUISetState()

   $oRDP.Server = $SerName
   $oRDP.UserName = $UserName
   
   $oRDP.Connect()

   While 1
      $msg = GUIGetMsg()
      Select
         Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
         EndSelect  
   WEnd
   GUIDelete()

Please help me to send password also.

I couln't find solution for my problem in this forum

There are several softwares that can send password. such "RemoteDesktop Manager", ... .  But I want to do it by Autoit.

Edited by mohammadezazi
Link to comment
Share on other sites

Not sure it is possible... ... in fact, really possible !

You can still temporarily add the credential to the credential manager (using Cmdkey.exe or WinApi CredWrite function), juste before the connection, and delete it after.

It's not really clean, but can work.

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