Is there a way to programmatically launch a background (i.e. non-windowed) executable without launching an associated conhost.exe process?
I have tried code such as this in the launcher process that spawns the worker process(es):
var process = new Process();
process.StartInfo.FileName = executable;
process.StartInfo.Arguments = args;
process.StartInfo.UseShellExecute = false;
process.StartInfo.CreateNoWindow = true;
Any help would be appreciated.
Context:
We are doing performance and load testing. To replicate our large customer environments, we have leased server capacity to allow us to run thousands of virtual servers but they are memory constrained (~ 300-500MB memory per VM).
The scenario is to run 100 processes per VM. The combination of the ~1.3 MB executable process and the 4-5 MB conhost.exe process (on Windows Server Standard Edition core update 1803) makes it impossible to run 100 processes. If we could eliminate the associated conhost.exe, we'd have a shot.
Note: conhost is much smaller on a Windows 7 environment (< 800KB) but we have to use Windows server.
This same scenario works on Linux.