title: After CreateProcessWithLogonW, second application not taking credentials
body: <p>How can I create a process (a.exe) using CreateProcessWithLogonW that is realtime (note that I'm not an admin user but the one I'm using with CreateProcessWithLogonW is admin) and launch another process (b.exe) from a.exe using CreateProcess and have it realtime also?</p>
  
  <p>Here is the code to launch a.exe:</p>
  
  <pre><code>PROCESS_INFORMATION pi = { 0 };
  STARTUPINFO         si = { 0 };
  if (!CreateProcessWithLogonW(argv[1], argv[2], argv[3], LOGON_NETCREDENTIALS_ONLY, NULL, _T("a.exe"),
  REALTIME_PRIORITY_CLASS, NULL, NULL,
  &amp;si, &amp;pi))
  {
      cout &lt;&lt; "Error!!!!\n";
  }
  </code></pre>
  
  <p>Here is the code to launch b.exe from a.exe:</p>
  
  <pre><code>SECURITY_ATTRIBUTES   security_att;
  STARTUPINFO           si;
  PROCESS_INFORMATION   pi;
  ZeroMemory(&amp;security_att, sizeof(security_att));
  security_att.nLength        = sizeof (SECURITY_ATTRIBUTES);
  security_att.bInheritHandle = TRUE;
  
  ZeroMemory(&amp;si, sizeof(si));
  si.cb          = sizeof(si);
  si.dwFlags     = STARTF_USESHOWWINDOW;
  si.wShowWindow = SW_NORMAL;
  
  if(!CreateProcess(NULL, "b.exe", &amp;security_att, &amp;security_att, FALSE, REALTIME_PRIORITY_CLASS, NULL, NULL, &amp;si, &amp;pi))
  {
              cout &lt;&lt; "Error!!!!\n";
  }
  </code></pre>
  
  <p>Currently, a.exe will be realtime priority but b.exe is only high priority. </p>