C#调用exe

using System.Diagnostics;

 

        static void Main(string[] args)
        {
            Process myProcess = Process.Start("c:\\test\\DIY.exe");
            while (!myProcess.HasExited)
            {
                Console.WriteLine("still running");
                Thread.Sleep(1000);
            }
            Console.WriteLine("QUIT");
        }

posted @ 2009-05-25 10:12  emery  阅读(427)  评论(2编辑  收藏  举报