开发者

Executing a process on a remote machine with Sysinternals PsExec

I'm working on an ASP.NET\C# application.

I'm trying to execute a process in a remote machine using system.Diagnostics.process and Sysinternals PsExec.

Here's my code example:

ProcessStartInfo startInfo = new ProcessStartInfo("psexec");

startInfo.Arguments = string.Format(CultureInfo.CurrentCulture, @"\\machineNAme c:\someDir\Command.exe");
startInfo.UseShellExecute = false;

Process process = new Process();
StreamReader reader = null;
process.StartInfo = startInfo;
process.Start();

Command.exe is just a simple test to open cd cri开发者_开发问答ve. This code works on a web app on localhost but not on my webapp that is currently on iis.

What am I missing? tks


You can execute a process in a remote machine using this web based tool ASN Active Directory Network Manager.


Permissions. You cannot control that hardware from a web app. Possibly an ActiveX control.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜