title: How to execute a simple command line with CreateProcess?
body: <p>I'd like to execute a simple command line but without to make a window appear. Therefore I can't use System and have to use CreateProcess as far as I know.
  So I have the following code for example:</p>
  
  <pre><code>//.../
  
  CreateProcess(NULL,input,NULL,NULL,false,NORMAL_PRIORITY_CLASS | 
   CREATE_NO_WINDOW,NULL,NULL,&amp;startInf,&amp;procInf);//)
  
  //.../
  </code></pre>
  
  <p>If input is a line like <em>"ping www.google.com -n 2"</em> it seems to work.
  What I need is the deletion-function though.
  Therefore I tried a lot of variations like: </p>
  
  <pre><code>input = "rd /S /Q \"D:\\ALEX_DATEN\\PC\\C++\\bla\"";
  </code></pre>
  
  <p>and </p>
  
  <pre><code>  input = "rd /S /Q \"D:/DATEN/PC/C++/bla\"";
  </code></pre>
  
  <p>But nothing happens and the function returns failure :/
  If I write it as a .bat file (without using the "\" escaping chars) the deleting works perfectly!</p>
  
  <p>Does anyone know what I'm doing wrong?</p>
  
  <p>P.s. no, I'm not writing a destructive virus.. if that would have been my target, I would have definitely have found simpler ways...</p>