How do I get the working directory of a running System.Diagnostics.Process?
<p>I'm trying to make the working directory of a cmd process persistent, so that I can send multiple commands in succession to it over tcp.</p>

<p>I understand how to set the working directory when I start the process</p>

<pre><code>proc.StartInfo.WorkingDirectory = something;
</code></pre>

<p>But after I start and wait for the process to exit, how can I get the current working directory in case "cd" was used?</p>
