title: cmd commands in ShellExecute
body: <p>I am trying in execute <code>netsh winsock reset catalog</code> command in <code>command prompt</code> from an <code>elevated(has admin privileage) c++ application</code>.</p>
  
  <pre><code>HINSTANCE retVal = ShellExecute(NULL, "open", "cmd", "\c netsh winsock reset catalog &gt; CUninstall.log", NULL, SW_NORMAL); 
  </code></pre>
  
  <p>It just opens the command prompt and nothing else happens. I have tried</p>
  
  <pre><code>HINSTANCE retVal = ShellExecute(NULL, "runas", "cmd", "\c netsh winsock reset catalog &gt; CUninstall.log", NULL, SW_NORMAL); 
  </code></pre>
  
  <p>and</p>
  
  <pre><code>HINSTANCE retVal = ShellExecute(NULL, "open", "cmd", " netsh winsock reset catalog &gt; CUninstall.log", NULL, SW_NORMAL); 
  </code></pre>