I’m using System.Diagnostics.ProcessStartInfo to set up the parameters for launching a process from a .NET program. Once the the process is started, I can use
myProcess.PriorityClass = ProcessPriorityClass.Idle
To change the priority for the process to idle, so that it only runs in the background, and doesn’t hog my CPU power. Is there any way using the ProcessStartInfo object to specify that the process should start with an “Idle” priority, so that at no time during execution is the process running at higher than idle speed?
Start the process suspended, then change the priority, and then resume the process. You do this with the CreateProcess Win32 function using the CREATE_SUSPENDED flag but unfortunately I am not sure if there’s support in .NET for this and you might need to resort to P/Invoke.