0

Possible Duplicate:
How do I start a process with idle priority in .Net

How to run Process.Start on a background thread and give it high priority? I am in a wpf C# application. Thanks

Community
  • 1
  • 1
user1202434
  • 2,243
  • 4
  • 36
  • 53

1 Answers1

2

Start a process with

Process.Start() 

And then set PriorityClass after you launched it.

About starting Processes from threads see this link: Async process start and wait for it to finish

   ThreadPool.QueueUserWorkItem(delegate {
        Process process = Process.Start(startInfo);
        if(process.WaitForExit(timeout)) {
            // user exited
        } else {
            // timeout
        }
    });
Community
  • 1
  • 1
margabit
  • 2,924
  • 18
  • 24