Once you start a new process, its service life is independent of your current applications. If you want the execution artifact directly tied to the lifetime of the current application, use threads.
If you want to create a child process and then complete it, you need to kill it:
Process proc = new Process(); proc.StartInfo.FileName = @"C:\program files\MyProgram\start.exe"; proc.StartInfo.Arguments = Application.ExecutablePath; proc.Start();
However, I would not recommend the above for most scenarios, as this can lead to data corruption if the child process is killed during a critical operation (for example, saving to a file).
source share