privatestaticvoidStartAConsoleProcess(string exePath, paramsstring[] cmdText) { Process p = new Process(); p.StartInfo = new ProcessStartInfo(exePath); p.StartInfo.UseShellExecute = false; //是否使用操作系统shell启动
if (exePath.Contains(Path.DirectorySeparatorChar)) { var file = new FileInfo(exePath); p.StartInfo.WorkingDirectory = file.Directory.FullName; }