Atoo E

Atoo E

  • 2.1k
  • 1
  • 753

How to run a file(any file) in a remote computer - C#?

Jul 22 2015 11:34 PM
I need to RUN and/or  KILL(Stop) any file in a remote computer(s) from my computer.
I was thinking to run CMD.EXE open cmd then run or kill any file form there.
my code runs cmd and open notepad ( as an example at my computer) NOT in a the remote computer :(
please any help?
System.Diagnostics.ProcessStartInfo psi = new ProcessStartInfo();                   
psi.WorkingDirectory = @"RemoteComputerName\C:\WINDOWS\system32";         
psi.FileName = "cmd.exe"; 
Process p = Process.Start(psi); 

but it runs cmd and open notepad at my computer NOT the remote computer.
please any idea and help to fix the issue? and then how to kill a file?

Thank you for any help. :)

Answers (1)