启动程序集以外其他应用程序

代码内详

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/// <summary>
///开启一个进程
/// </summary>
/// <param name="FileName">文件名(包含路径)</param>
/// <param name="ErrorMsgPagePath">运行参数</param>
private static void StartProcess(string FileName,string ErrorMsgPagePath)
{
        try
       {
               if (!System.IO.File.Exists(FileName))
               return;
               System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
               myProcess.StartInfo.Arguments = ErrorMsgPagePath;
               myProcess.StartInfo.UseShellExecute = true;
               myProcess.StartInfo.FileName = FileName;
               myProcess.Start();
               //myProcess.WaitForExit();
      }catch (Exception ex)
     {
             Console.WriteLine(ex.Message);
     }
}
分享这个帖子:
Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

1个评论 to “启动程序集以外其他应用程序”

留下评论:

昵称(必须):
邮箱地址 (不会被公开) (必须):
站点
评论 (必须)
XHTML: 您可以使用这些标记: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">