How to create suspended process from c# without P/Invoke?
c#, createprocess, pinvoke, process, suspend
Solution
The only way to do this is with `CreateProcess`. The .net `Process` class does not offer the functionality. Either p/invoke `CreateProcess` or use a mixed mode C++/CLI assembly to call the same.
Problem
WinAPI CreateProcess has the flag CREATE_SUSPENDED so it's possible to attach process to JobObject before it has done something and then to call ResumeThread for its main thread. The only that I found searching for a solution is this post written 11 years ago!