Ik wil via een programma een ander console venster starten hierop commands uitvoeren, maar ik weet niet hoe dit moet. Ik moet drie dingen uitvoeren, en hoef niks te lezen. Kan iemand hier een voorbeeld van geven, alvast bedankt.
Code:
// Opstarten
Process spark = new Process();
spark.StartInfo.FileName = (Directory.GetCurrentDirectory() + @"\SparkCS.exe");
spark.StartInfo.UseShellExecute = false;
spark.StartInfo.RedirectStandardInput = true;
spark.StartInfo.RedirectStandardOutput = true;
spark.StartInfo.RedirectStandardError = true;
spark.StartInfo.CreateNoWindow = true;
spark.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
spark.Start();
// Aflsuiten
spark.Close();
spark.Dispose();