string file = System.IO.Path.GetDirectoryName("所在控制台应用程序所在目录"); System.Diagnostics.Process p; p = new System.Diagnostics.Process(); p.StartInfo.FileName = file; p.StartInfo.Arguments=需要传给控制台程序的参数,有则填,没有则不必写此行; p.Start(); // 开始调用
起个线程中,CreateProcess