How do I start a process from C#?

后端 未结 12 2047
北荒
北荒 2020-11-22 03:38

How do I start a process, such as launching a URL when the user clicks a button?

12条回答
  •  旧时难觅i
    2020-11-22 04:15

    var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "/YourSubDirectory/yourprogram.exe");
    Process.Start(new ProcessStartInfo(path));
    

提交回复
热议问题