Reputation: 193
I need to start a process from a C# console app and then allow the console app to finish/end without waiting for the process/thread to finish.
How do I do this?
Upvotes: 10
Views: 10428
Reputation: 2435
You need to avoid making your new process a child process of the current process:
ProcessStartInfo sinfo = new ProcessStartInfo();
sinfo.UseShellExecute = true; // Do not wait - make the process stand alone
sinfo.FileName = "PathAndNameofExe";
Process.Start(sinfo);
Upvotes: 9