小编典典

从C#启动应用程序(.EXE)?

c#

如何使用C#启动应用程序?

要求:必须在Windows XPWindows
Vista上工作

我已经看到了DinnerNow.net采样器中的示例,该示例仅在Windows Vista中有效。


阅读 648

收藏
2020-05-19

共1个答案

小编典典

使用System.Diagnostics.Process.Start()方法。

查看有关如何使用它的文章

Process.Start("notepad", "readme.txt");

string winpath = Environment.GetEnvironmentVariable("windir");
string path = System.IO.Path.GetDirectoryName(
              System.Windows.Forms.Application.ExecutablePath);

Process.Start(winpath + @"\Microsoft.NET\Framework\v1.0.3705\Installutil.exe",
path + "\\MyService.exe");
2020-05-19