1 public void StartProcess(string name) 2 { 3 string exeFileName = "DataControl.exe"; 4 string startPath = Application.StartupPath; 5 string startProcsssTongti = startPath + ConfigurationManager.AppSettings[name].ToString(); //不包含exe名称的路径 6 string exePath = System.IO.Path.Combine(startProcsssTongti, exeFileName);// 拼接成完整路径 7 var info = new System.Diagnostics.ProcessStartInfo(exePath); 8 info.UseShellExecute = true; 9 info.WorkingDirectory = exePath.Substring(0, exePath.LastIndexOf(System.IO.Path.DirectorySeparatorChar)); 10 System.Diagnostics.Process.Start(info); 11 }
exePath:D:OneKeyStartLedAppinDebug ongtiDataControl.exe