public void StartMessageServer(string queueManager) { StringBuilder strCommand = new StringBuilder(); strCommand.Append(queueManager); try { Process cmd = new Process(); cmd.StartInfo.FileName = @"C:\Program Files\IBM\WebSphere MQ\bin\strmqm.exe"; cmd.StartInfo.Arguments = strCommand.ToString(); cmd.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; cmd.StartInfo.UseShellExecute = false; cmd.StartInfo.RedirectStandardOutput = true; cmd.Start(); PublisherUtils.WriteText(cmd.StandardOutput.ReadToEnd(), this.OutputListBox); cmd.WaitForExit(5000); cmd.Close(); } catch(Exception ex) { PublisherUtils.WriteText(ex.Message, this.OutputListBox); } }