title: ShellExecute a cmd prompt with a specific working directory
body: <p>I want to launch an elevated command prompt in Windows to a specific working directory. So for example, I have tried this:</p>
  
  <pre><code>ShellExecute(
      hWnd,
      L"runas",
      L"cmd.exe",
      NULL,
      m_szSelectedFile,
      SW_SHOW
  );
  </code></pre>
  
  <p>Where <code>m_szSelectedFile = L"C:\\Users\\User\\Desktop"</code></p>
  
  <p><code>ShellExecute</code> is documented as</p>
  
  <pre><code>HINSTANCE ShellExecute(
    _In_opt_ HWND    hwnd,
    _In_opt_ LPCTSTR lpOperation,
    _In_     LPCTSTR lpFile,
    _In_opt_ LPCTSTR lpParameters,
    _In_opt_ LPCTSTR lpDirectory,
    _In_     INT     nShowCmd
  );
  </code></pre>
  
  <p>Unfortunately, it always launches to <code>C:\WINDOWS\system32</code>. What am I doing wrong?</p>