使用MSTSCLib登录到远程桌面

本文关键字:桌面 程桌面 MSTSCLib 登录 使用 | 更新日期: 2023-09-27 18:27:01

我正在尝试登录远程桌面。我可以用以下代码打开登录屏幕。(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();

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

使用MSTSCLib登录到远程桌面

密码应以rdpSP.AdvancedSettings9.ClearTextPassword 的形式保存