C# 如何调用可执行程序传参
/// <summary> /// LIS接口, 说是只要进界面就要一起启动他们的FTP,我也不懂是做什么的,反正按LIS的要求做呗 \\ /// by weihf 2014-9-1 /// to weihf : 为了更新lis程序 /// /// </summary> /// <returns></returns> private void StarLisFTP() { try { System.Diagnostics.Process[] proc = System.Diagnostics.Process.GetProcessesByName("NeuLisFTP"); if (proc.Length > 0) { for (int i = 0; i < proc.Length; i++) { proc[i].Kill(); } } string path = Application.StartupPath + "\\NeusoftLis/" + "NeuLisFTP.exe"; Neusoft.HISFC.Models.Base.Employee conInfo = Neusoft.FrameWork.Management.Connection.Operator as Neusoft.HISFC.Models.Base.Employee; string strArgument = conInfo.Dept.ID + "," + conInfo.Dept.Name + "," + conInfo.Dept.ID + "," + conInfo.Dept.Name + "," + conInfo.Nurse.ID + "," + conInfo.Nurse.Name + "," + conInfo.EmployeeType.ID.ToString() + "," + "住院"; System.Diagnostics.ProcessStartInfo pInfo = new System.Diagnostics.ProcessStartInfo(path, strArgument); System.Diagnostics.Process process = new System.Diagnostics.Process(); process.StartInfo = pInfo; process.StartInfo.UseShellExecute = false; process.Start(); } catch (Exception ex) { MessageBox.Show("启动危机值程序出错,请手工启动或者联系信息科!" + ex.Message); } } #region by yang.bf 2015年9月25日16:40:36 {D986E343-DE6B-410a-89EF-47F93418CDE1} 护士站是否开启lis 自动更新 Neusoft.FrameWork.Management.ControlParam ctlMgr = new Neusoft.FrameWork.Management.ControlParam(); if (ctlMgr.QueryControlerInfo("KH_Lis") == "1") { if( System.IO.File.Exists(Neusoft.FrameWork.WinForms.Classes.Function.CurrentPath+ "\\NeusoftLis\\NeuLisFTP.exe")) { Thread LisFTP = new Thread(this.StarLisFTP); LisFTP.Name = "NeuLisFTP"; LisFTP.IsBackground = true; LisFTP.Start(); } else { MessageBox.Show("NeusoftLis的目录下没有NeuLisFTP.exe文件"); } } #endregion