Not to long ago i asked about an error msg that occurred when when app.PriorityClass = ? was before app.start. Apparently the solution which i didnt like was to write it after start.
It worked without much problem until today. I get a "Cannot process request because the process has exited." exception because the process completes quickly enough to not have its priority changed (some of the time). Wrapping a try around this feels bad. What is the real solution? how do i launch a process with low priority ?
Process app = new Process();
app.StartInfo.FileName = @"bin\convert.exe";
app.StartInfo.Arguments = string.Format("{0} -resize 150x150 {1}", filename, thumbName);
//app.PriorityClass = ProcessPriorityClass.BelowNormal; //No process is associated with this object.
app.Start();
//app.PriorityClass = ProcessPriorityClass.BelowNormal; //"Cannot process request because the process has exited."