title: Find Drive Letter Using Net Use
body: <p>What I'm trying to do</p>
  
  <ul>
  <li>Launch PSExec to open CMD on a remote computer passing "Net Use * \Server\Share" command</li>
  <li><strong>Launch PSExec again and remove the share i just created.</strong></li>
  </ul>
  
  <p>I can't seem to figure out how to get the drive letter that the wild card used.</p>
  
  <pre><code>Process p = new Process();
  p.StartInfo.UseShellExecute = false;
  p.StartInfo.FileName = @"\\Server\PStools\PSExec.exe";
  p.StartInfo.Arguments = @"\\ComputerName -e -s cmd.exe ""/C Net USE * \\Server\Share /Persistent:NO""";            
  p.Start();            
  </code></pre>