[英]What library do I need to reference for remote connection to RDC server from console app?
We have a terminal server: "server.host.com". 我们有一个终端服务器:“ server.host.com”。 Normally, we RDP into that server for our business applications.
通常,我们将RDP导入该服务器以用于业务应用程序。 However, I am performing some datamining and want to bring the .xml files to a local system for post processing.
但是,我正在执行一些数据挖掘,并希望将.xml文件带到本地系统进行后期处理。
My utility app would basically log in (impersonating my account), navigate to the directory where the .xml files are stored, then begin copying to a local directory. 我的实用程序应用程序基本上会登录(模拟我的帐户),导航到.xml文件的存储目录,然后开始复制到本地目录。 This utility would be set to run every morning at 3am unattended.
该实用程序将设置为每天早上3点在无人值守的情况下运行。
I am trying to determine whether WMI is the correct library, or Remoting, or some other library? 我正在尝试确定WMI是正确的库还是Remoting或其他库? Is this even going to be possible?
这甚至有可能吗?
So if you are looking at using Microsoft's remote desktop, you can add a reference to Microsoft Terminal Services Control Type Library in the COM section. 因此,如果您要使用Microsoft的远程桌面,则可以在COM部分中添加对Microsoft终端服务控件类型库的引用。 If you are working with a gui, you can just drag the control and do something like:
如果您使用的是gui,则可以拖动控件并执行以下操作:
rdp.Server = txtServ.Text;
rdp.UserName = txtUser.Text;
IMsTscNonScriptable secured = (IMsTscNonScriptable)rdp.GetOcx();
secured.ClearTextPassword = txtPassword.Text;
rdp.Connect();
If you are using the console, should be just as simple just without the buttons and all. 如果您使用的是控制台,那么应该没有按钮和所有按钮一样简单。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.