title: Get executable name from complete command line
body: <p>When I get a full command line string from the registry, or elsewhere, for example:</p>
  
  <pre><code>mycommand -p -o c:\file\1.txt -r output
  </code></pre>
  
  <p>or</p>
  
  <pre><code>"c:\program files\dir\executable.exe" -options -o1 -o2
  </code></pre>
  
  <p>How could I split easily between the executable file and the arguments?</p>
  
  <p>Thanks</p>