Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Login to a remote desktop using MSTSCLib

I am trying to log in on a remote desktop. I am able to open the login screen with the following code. (rdpSP is a Microsoft Terminal Server Client Control - version 1)

  rdpSP.Server = "the IP";
  rdpSP.Domain = "the domain";
  rdpSP.UserName = "the username";
  MSTSCLib.IMsTscNonScriptable secured = (MSTSCLib.IMsTscNonScriptable)rdpSP.GetOcx();
  secured.ClearTextPassword = "the password";
  rdpSP.Width = this.Width;
  rdpSP.Height = this.Height;
  rdpSP.Connect();

Now I can see the login screen and the user domain/username. But the password isn't used. Is it possible to log in automaticly or at least fill in the password?

like image 468
maartenvdv Avatar asked Nov 10 '22 00:11

maartenvdv


1 Answers

The password should be saved in the form rdpSP.AdvancedSettings9.ClearTextPassword

like image 181
Sam Avatar answered Nov 14 '22 23:11

Sam