远程执行流程 [英] execute a process remotely

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

问题描述

嗨 我对system.diagnostics.process进行远程处理时遇到问题
我想知道如何使用它来执行远程处理
我使用了system.diagnostics.process.start()并在远程系统中使用了我的exe文件的正确路径,并且具有很好的访问权限,但是没有执行

解决方案

您不使用Process.Start来启动远程进程.如果您正在使用远程进程,则Process类仅允许您查看进程(假设您具有正确的特权).如果我是你,我会改用WMI.这是我在CP文本框中找到的示例实现:

 ManagementClass mc = 新建 ManagementClass(  \ replace_with_your_server \ root \ cimv2:Win32_Process");
mc.InvokeMethod("  对象 [] {" }); 


您也可以使用PsTools中的PsExec

http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx [ ^ ]


hi i have a problem with system.diagnostics.process for remotely process
i want to know how use it for execute for remotely process
i used system.diagnostics.process.start()and with correct path of my exe file in remote system and with good permision to accessing it but does not execute
can help me how using this command?

解决方案

You don''t use Process.Start to fire off remote processes. If you are working with a remote process, the Process class only allows you to view the processes (assuming you have the correct privileges). If I were you, I''d use WMI instead. Here''s a sample implementation I knocked up in the CP textbox:

ManagementClass mc = new ManagementClass(@"\replace_with_your_server\root\cimv2:Win32_Process");
mc.InvokeMethod("Create", new object[]{ "c:\program files\MyCompany\MyProcess.exe" });


You can also use PsExec from PsTools

http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx[^]


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

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