简体   繁体   English

从控制台应用程序远程连接到RDC服务器需要引用什么库?

[英]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.

相关问题 为什么我会收到无法从 Web 应用程序而不是控制台应用程序连接到远程服务器的异常? - Why do I get an Unable to connect to the remote server exception from a web app and not console app? 从本地数据库移动到远程。 我需要什么? - moving from local database to remote. What do I need? 位于服务器上的Win32控制台应用程序,是否需要重建才能更新app.config? - Win32 console app living on server, do I need to rebuild in order to update app.config? 访问CustomTextParagraphProperties我需要参考什么? - What do I need to reference to access CustomTextParagraphProperties? 如何通过C#最小化远程桌面连接(RDC)窗口? - How to minimize the remote desktop connection (RDC) window through C#? 我在这里需要参考什么? - What do I need to reference here? 我是否需要从直接退出的控制台关闭与WCF服务的连接? - Do I need to close the connection to a WCF service from a console that exits straight away? 我需要为 HtmlWeb 使用什么库? - What library do I need to use for HtmlWeb? 我为控制台应用程序附加了什么过程? - what process do I attach to for a console app? 从远程服务器上运行的控制台应用程序捕获输出 - Capture output from console app running on remote server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM