使用MSTSCLib远程登录桌面

5

我正在尝试远程登录桌面。以下是打开登录界面的代码。(rdpSP是Microsoft Terminal Server Client Control - 版本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
它拥有许多事件,它们会告诉您出了什么问题。如果您不订阅它们,则无法确定问题可能是什么。 - Hans Passant
1
报告错误的应该在你的列表顶部。OnLogonError、OnFatalError、OnWarning。 - Hans Passant
没有任何一个事件被调用,所以我认为它没有错误。 - maartenvdv
我认为这是服务器设置,不接受提供的密码并强制用户手动输入。 - Uwe Keim
我在哪里可以找到那些服务器设置? - maartenvdv
显示剩余3条评论
1个回答

1
密码应该保存在表单中rdpSP.AdvancedSettings9.ClearTextPassword

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接