Here is the code that i use:
private void button1_Click(object sender, EventArgs e)
{
Process New = new Process();
New.StartInfo.FileName = @"C:\Users\Kristifor\Desktop\Flash fixer\List Disk.bat";
New.StartInfo.UseShellExecute = false;
New.StartInfo.RedirectStandardOutput = true;
New.StartInfo.CreateNoWindow = true;
New.Start();
textBox1.Text = New.StandardOutput.ReadToEnd();
string g = textBox1.Text;
MessageBox.Show(g);
}


Anurag SarkarRank #1,049 · 1.8K reputationPosted Apr 13, 2014, 11:56 PM EDT
Kristifor Milchev7 reputationPosted Apr 14, 2014, 12:36 AM EDT
C:\users\Kristifor\document\visual studio\projects\project name
i get it before the actual info that i need for my purpose
(If statements are not an option since the if statement would only work for my machine not any other machine that i try to start the program)