How to create a Process that outlives its parent

前端 未结 3 1245
栀梦
栀梦 2020-11-30 13:35

I\'m trying to launch an external updater application for a platform that I\'ve developed. The reason I\'d like to launch this updater is because my configuration utility w

3条回答
  •  佛祖请我去吃肉
    2020-11-30 14:21

    It seems that the problem you are seeing has a different reason because the Process class will not kill any processes started using Process.Start when your application exits.

    See this simple sample program, the calculator will stay open:

    using System.Diagnostics;
    
    class Program
    {
        static void Main(string[] args)
        {
            Process.Start(@"C:\windows\system32\calc.exe");
        }
    }
    

提交回复
热议问题