从C#启动应用程序(.EXE)? [英] Launching an application (.EXE) from C#?
本文介绍了从C#启动应用程序(.EXE)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用C#启动应用程序?
How can I launch an application using C#?
要求:
必须在 Windows XP 和 Windows&Vista 。
我从DinnerNow.net采样器中看到了一个示例,该示例仅适用于Windows Vista。
I have seen a sample from DinnerNow.net sampler that only works in Windows Vista.
推荐答案
使用 System.Diagnostics.Process.Start()
方法。
签出本文有关如何使用它的信息。
Check out this article on how to use it.
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");
这篇关于从C#启动应用程序(.EXE)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文