private static void SendPrintProcess(object printCommand) { //Declare and instantiate a new process component. Process cmdProcess = new Process(); try { //ExceptionMngr.WriteEventLog(batFile + " "+ printCommand); //Do not receive an event when the process exits. cmdProcess.EnableRaisingEvents = false; cmdProcess.StartInfo.UseShellExecute = false; cmdProcess.StartInfo.FileName = batFile; cmdProcess.StartInfo.Arguments = printCommand.ToString(); cmdProcess.StartInfo.CreateNoWindow = true; cmdProcess.Start(); cmdProcess.WaitForExit(); cmdProcess.Close(); } catch (Exception ex) { //ExceptionMngr.WriteEvent("SendPrintProcess: " + printCommand, ListValues.EventType.Fatal, ex, null, ListValues.ErrorCategory.Business); ExceptionMngr.WriteEventLog(WriteLog.GetTechMessage(ex)); } }