开发者

Executing a process on a remote machine with Sysinternals PsExec

开发者 https://www.devze.com 2022-12-21 19:21 出处:网络
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.

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

精彩评论

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