C#启动程序Rdpclient [英] c# start program Rdpclient

查看:260
本文介绍了C#启动程序Rdpclient的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

axMsRdpClient8NotSafeForScripting1.SecuredSettings.StartProgram = @"calc.exe";           

axMsRdpClient8NotSafeForScripting1.SecuredSettings.WorkDir = @"C:\ Windows \ System32 \";

axMsRdpClient8NotSafeForScripting1.SecuredSettings.WorkDir = @"C:\Windows\System32\";



推荐答案

嗨! Lolik,

Hi  Lolik,

我测试了以下代码,发现它可以连接远程PC,但无法在远程PC中运行应用程序calc.exe.我认为,我建议在远程PC中修改一些配置.您可以看到以下链接.

I tested the following code, and found that it can connect the remote pc, but cannot run application calc.exe in the remote pc. In my opinion, I suggest that modify some configure in the remote pc. You could see the following link.

https://technet.microsoft.com/zh-CN /library/cc736643%28v=ws.10%29.aspx

说明适用于:Windows Server 2003,Windows Server 2003 R2,带有SP1的Windows Server 2003,带有SP2的Windows Server 2003

Note applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

这是我的测试代码,根据我的理解,我无法在Rdpclient中启动程序,这是设计使然.

Here is my test code, I can not start program in Rdpclient, per my understandind, this is by design.

try
            {
                axMsRdpClient8NotSafeForScripting1.Server = "192.168.3.122";
                axMsRdpClient8NotSafeForScripting1.UserName = "administrator";
                axMsRdpClient8NotSafeForScripting1.AdvancedSettings8.ClearTextPassword = "Password";
                axMsRdpClient8NotSafeForScripting1.SecuredSettings.StartProgram = @"calc.exe";

                axMsRdpClient8NotSafeForScripting1.SecuredSettings.WorkDir = @"C:\Windows\System32\";
                axMsRdpClient8NotSafeForScripting1.Connect();
            }
            catch (Exception Ex)
            {
                MessageBox.Show("Error Connecting", "Error connecting to remote desktop " + " Error:  " + Ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

最诚挚的问候,

克里斯汀


这篇关于C#启动程序Rdpclient的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆