I am trying to start a process under a different account (setting StartInfo.UserName/Password).
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.
I've tried to switch to the WIN32 API and to create a new WindowStation with STARTUPINFO.lpDesktop="" but I get the same error.
Update: I just found a related question, unfortunately it is also missing an answer: Permissions problem when starting .NET app from .NET service as a different user?