C#从批处理文件中读取输出

时间:2016-06-18 04:44:23

标签: c#

请帮我解决这个问题

           
<?php
    if (isset($_POST['choose'])) {
        echo "The value I choose was: " . $_POST['choose'];
        exit(); //only add this if want to stop here and 
                //not show your form again since it is the same page 
    }
?>

我需要帮助这个我要做什么

Process myProcess = new Process(); ProcessStartInfo myProcessStartInfo = new ProcessStartInfo(batchfilelocation); myProcessStartInfo.UseShellExecute = false; myProcessStartInfo.RedirectStandardOutput = true; myProcess.StartInfo = myProcessStartInfo; myProcess.Start(); StreamReader myStreamReader = myProcess.StandardOutput; // Read the standard output of the spawned process. string concatenatedString = null; concatenatedString += myStreamReader.ReadToEnd(); listBox1.Text = listBox1.Text + concatenatedString; myProcess.Close();

0 个答案:

没有答案