Process myProcess = new Process();
ProcessStartInfo myProcessStartInfo = new ProcessStartInfo(Server.MapPath("test.bat"));
myProcessStartInfo.UseShellExecute = false;
myProcessStartInfo.RedirectStandardOutput = true;
myProcess.StartInfo = myProcessStartInfo;
//設置不顯示窗口
myProcess.StartInfo.CreateNoWindow = true;
myProcess.Start();
myProcess.Close();