title: PsExec does not detect my c# console app is finished
body: <p>I use PsExec for executing several command line programs, but when I call my own build C# (.net 4.0) console app, PsExec does hang, and will not finish...</p>
  
  <p>When calling other console apps, PsExec will return output like this:</p>
  
  <pre><code>PsExec v1.98 - Execute processes remotely
  Copyright (C) 2001-2010 Mark Russinovich
  Sysinternals - www.sysinternals.com
  Connecting to localhost...
  Starting PsExec service on localhost...
  Connecting with PsExec service on localhost...
  Starting [MyExe] on localhost...
  [myExe] exited on localhost with error code 0.
  </code></pre>
  
  <p>But on my own C# console app only show this output:</p>
  
  <pre><code>PsExec v1.98 - Execute processes remotely
  Copyright (C) 2001-2010 Mark Russinovich
  Sysinternals - www.sysinternals.com
  </code></pre>
  
  <p>My console app has some logging itself, and it executes fine, and exits with exit code 0 in about 2 seconds, but after 40 seconds, PsExec has still no output.</p>
  
  <p>On the target machine the PsExecSVR is still installed, and running.</p>
  
  <p>I've tried to exit the console app with</p>
  
  <pre><code>Environment.Exit();
  </code></pre>
  
  <p>And also removed this line, and let the console app exit on it's own (by letting void main to end on its own). But still no luck on PsExec.</p>