title: How to run a long cmd command using psexec?
body: <p>I am trying to use PsExec to run the following command:<br>
   <code>net use Z: \\myComputerName\c\ProgramData\directoryA</code><br>
  to map drive Z on my computer.<br>
  It works fine when I run it as is (without psexec before it) on the console.  </p>
  
  <p>But it doesn't work with psexec.<br>
  Here is the full psexec command line I am running in the console:  </p>
  
  <pre><code>psexec -i -d \\myComputerName -u userName -p password   
         net use Z: \\Davidpc\c\ProgramData\ESET  
  </code></pre>
  
  <p>If I run any other short command like: <code>calc</code> or <code>notepad.exe</code> or <code>cmd.exe</code> etc instead of<br>
  "<strong>net use Z: \Davidpc\c\ProgramData\ESET</strong>" it works fine<br>
   (meaning it strats the calculator \ notepad \ console)    </p>
  
  <p>How can I make it work using psexec?</p>