title: CreateProcess() and ShellExecute() freeze when waiting for svchost.exe
body: <p>Under Windows 8 I'm starting an external program but it get stuck as a background process waiting for svchost.exe to return. If I start the same application manually (double click) it starts just fine.
  If I run the same code under Windows 7, it works just fine.</p>
  
  <p>I have mainly tried 3 ways of executing the application:</p>
  
  <pre><code>ShellExecute(NULL,L"open","MyApp.exe",NULL,NULL,SW_SHOWNORMAL);
  </code></pre>
  
  <p>This returns ok but the application freeze waiting for svchost.exe.
  Then I tried the Extended version.</p>
  
  <pre><code>SHELLEXECUTEINFO ShExecInfo;
  
  ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
  ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
  ShExecInfo.hwnd = Application-&gt;MainFormHandle;
  ShExecInfo.lpVerb = L"open";
  ShExecInfo.lpFile = L"MyApp.exe"
  ShExecInfo.lpParameters = NULL;
  ShExecInfo.lpDirectory = L"MyWorkDir";
  ShExecInfo.nShow = SW_SHOWNORMAL;
  ShExecInfo.hInstApp = NULL;
  
  res = ShellExecuteEx(&amp;ShExecInfo);
  </code></pre>
  
  <p>This also returns ok and I hInstApp is set, but still freeze as before.
  Then I tried CreateProcess().</p>
  
  <pre><code>STARTUPINFO si;
  PROCESS_INFORMATION pi;
  
  ZeroMemory(&amp;si, sizeof(si));
  si.cb = sizeof(si);
  ZeroMemory(&amp;pi, sizeof(pi));
  
  res = CreateProcess(L"MyApp.exe",NULL,NULL,NULL,false,0,NULL,L"MyWorkDir",&amp;si,&amp;pi);
  </code></pre>
  
  <p>This also returns ok and the PROCESS_INFORMATION is filled in correctly, but still it freeze.
  RAD Studio shows a debug message when I create the process:</p>
  
  <pre><code>Application "\??\C:\Windows\Program Files (x86)\ ... MyApp.exe" found in cache
  Application "\??\C:\Windows\Program Files (x86)\ ... MyApp.exe" cache bypassed reason 0x86
  </code></pre>
  
  <p>In Windows 8 Task manager I can see that the Process is waiting on svchost.exe to return.</p>