执行远程可执行文件 [英] Execute remote executables

查看:195
本文介绍了执行远程可执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想执行一个可执行文件(.bat / .exe / .py等),它位于我的远程服务器(比如MyServer)中机器(比方说MyClient)。

I want to execute an executable (.bat/.exe/.py etc) which is placed in remote server (let say MyServer) from my machine (let say MyClient).

我刚试过各种选项,比如使用.net进程,WMI,WAddConnection等,但结果不符合我的要求,即可执行文件在MyClient中执行  ;本身而不是MyServer。

I just tried with various options like using .net Process,WMI,WAddConnection etc, but result were not meeting my requirment, that's the executable gets executed in MyClient itself instead of in MyServer.

所以我只是尝试了.Net远程处理这种情况(不确定决定是对还是错?)

So i just tried .Net remoting for this scenario (not sure whether the decision right or wrong?)

我创建了一个ClientApp,ServerListner,ServerApp作为远程处理的一部分,它是成功的,可执行文件在远程机器本身中执行。但是再次出现了问题,我必须在运行ClientApp之前手动运行ServerListner。

I created a ClientApp,ServerListner,ServerApp as part of remoting, It was succesful and the executable got executed in remote machine itself. But again there is a struck-up, I have to run the ServerListner manually before run ClientApp.

所以我如何从MyClient以编程方式启动ServerListner?或者我在这里遗漏了什么?

So how do i start the ServerListner programatically from MyClient? Or Am i missing anything here?

请分享您的经验。

环境:FW2.0,Windows。

Env : FW2.0,Windows.

谢谢~Chandru

Thank you ~Chandru

 

 

推荐答案

大家好,

我通过Win32_Process实现了,请参考下面的URL获取更多详细信息。

I have achieved through Win32_Process, refer below URL for more detail.

http://motevich.blogspot.com/2007/11/execute-program-on-remote-computer .html

只需为他人分享这些信息。

Just sharing this information for others.

快乐编程!

〜 Chandru

 

 


这篇关于执行远程可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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