none
Login to a remote desktop using MSTSCLib RRS feed

  • Question

  • 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?


    Monday, November 3, 2014 8:20 AM

Answers

All replies

  • 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?

    Monday, November 3, 2014 8:16 AM
  • Hello maarten.vdv,

    >> But the password isn't used. Is it possible to log in automaticly or at least fill in the password?

    After looking through this class, unfortunately, this class does not provide a property which accepts the password. I think this is by designed and usually, for security purpose, we do not supply password in project directly.

    By the way, this issue seems to be related with the Microsoft Terminal Server Client Control, this is not supported in the current forum( discussing questions about .NET Framework Base Classes (BCL) such as Collections, I/O, Regigistry, Globalization, Reflection.) you post to.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, November 4, 2014 3:13 AM
    Moderator
  • Quoting MSDN:

    Scriptable access to plaintext passwords is available through the ClearTextPassword property of the scriptable interface IMsRdpClientAdvancedSettings.

    So you should probably use that interface to specify password.


    Saturday, November 8, 2014 1:12 AM