使用MSTSCLib登录远程桌面

时间:2014-10-17 08:54:03

标签: c# remote-desktop rdp

我正在尝试登录远程桌面。我可以使用以下代码打开登录屏幕。 (rdpSP是Microsoft终端服务器客户端控件 - 版本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();

现在我可以看到登录屏幕和用户域/用户名。但密码未被使用。 是否可以自动登录或至少填写密码?

1 个答案:

答案 0 :(得分:0)

密码应以rdpSP.AdvancedSettings9.ClearTextPassword

的形式保存
相关问题