title: Escaping strings when using wmic
body: <p>I'm trying to sart an instance of VLC using wmic
  I'm doing this mainly because I want to capture the pid of the created process</p>
  
  <p>I know the command below works fine from the command line: </p>
  
  <pre><code>C:\PROGRA~1\VideoLAN\VLC_117\vlc.exe rtsp://abcd --sout="#duplicate{dst=display, dst={std{access=file, mux=ps, dst='vlc_117/video.mpg'}}} --rtsp-caching=120 --no-video-title-show"
  </code></pre>
  
  <p>(where rtsp://abcd can be any input file for the purposes of this example) </p>
  
  <p>Trying to run it via wmic, with various different attempts as escape sequences (of which the below is one): </p>
  
  <pre><code>wmic process create 'C:\PROGRA~1\VideoLAN\VLC_117\vlc.exe rtsp://abcd --sout="#duplicate{dst=display, dst={std{access=file, mux=ps, dst='vlc_117/video.mpg'}}} --rtsp-caching=120 --no-video-title-show" '
  </code></pre>
  
  <p>Reliably gives me the same error:</p>
  
  <pre><code>Invalid format.
  Hint: &lt;assignlist&gt; = &lt;propertyname&gt;=&lt;propertyvalue&gt; [, &lt;assignlist&gt;].
  </code></pre>
  
  <p>However the following: </p>
  
  <pre><code>wmic process create 'C:\PROGRA~1\VideoLAN\VLC_117\vlc.exe rtsp://abcd --sout="#duplicate{dst=display} --rtsp-caching=120 --no-video-title-show"'
  </code></pre>
  
  <p>Works fine - except that as a command it is useless to me. So the problem seems to be with the nested curly bracketed section of my original command. </p>
  
  <p>I've tried various different escape characters...so far with no success. Can anyone suggest where I am going wrong? </p>