title: Error C0000142 when Starting a Process
body: <p>I am trying to start a process under a different account (setting StartInfo.UserName/Password).</p>
  
  <p>This works when run interactive but fails with error -1073741502 (C0000142; "DLL Initialization Failed") when trying to run it from a process that was started via the Task Scheduler.</p>
  
  <p>I've tried to switch to the WIN32 API and to create a new WindowStation with STARTUPINFO.lpDesktop="" but I get the same error.</p>
  
  <p><strong>Update</strong>: I just found a related question, unfortunately it is also missing an answer: <a href="https://stackoverflow.com/questions/2083299/permissions-problem-when-starting-net-app-from-net-service-as-a-different-user">Permissions problem when starting .NET app from .NET service as a different user?</a></p>