title: Problem while trying to run .exe on remote with psexec (c#)?
body: <p>Hey all,
  I'm trying to run an exe file ON A REMOTE MACHINE (not from, but ON).</p>
  
  <p>I have very simple code as following:</p>
  
  <pre><code>ProcessStartInfo info = new ProcessStartInfo("C:\\PsTools");
  info.FileName = "psexec \\\\" + machine.Name + "\\C\\Program Files\\test.exe";
  info.RedirectStandardOutput = true;
  info.UseShellExecute = false;
  Process p = Process.Start(info);
  </code></pre>
  
  <p>When trying to run this code i get "The system cannot find the file specified" error.</p>
  
  <ol>
  <li>There is a file named "test.bat" on the specified directory.</li>
  <li>The remote machine is on the same domain and the C folder is shared (I'm the admin).</li>
  <li>I have PsTools installed and configured as environment variables.</li>
  <li>I have tried variety of codes (for example if i don't use "psexec" on the ProcessStartInfo constructor and on the FileName property, the bat file runs on the local machine instead of the remote one...) and nothing works!</li>
  </ol>
  
  <p>any ideas? </p>