Wednesday, January 9, 2019

Run another exe, with arguments, and capture output...

       
         Exe Console Application Output is  New Order  created Successfully.  
     
       Testing.Exe : -
   
       Syntax :--
         Console.WriteLine("New Order  created Successfully:);
    

      Solution

            myProcess.Start();
            myProcess.WaitForExit();
          
           ////Create a streamreader to capture the output of myProcess
              System.IO.StreamReader ischkout = myProcess.StandardOutput;
            if(myProcess.HasExited)
            {
                string output = ischkout.ReadToEnd();
                Response.Write(output);
            }

No comments:

Post a Comment