Using the following code I am able to open the batch file, but I cannot seem to figure out how to execute the batch file silently. I don't want the command prompt window to appear.
What I have so far:
using System;
using System.Diagnostics;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
ProcessStartInfo processInfo = new ProcessStartInfo("C:\\Users\\Daniel\\Desktop\\test1.bat");
processInfo.WindowStyle = ProcessWindowStyle.Hidden;
processInfo.CreateNoWindow = true;
processInfo.UseShellExecute = true;
Process batchProcess = new Process();
batchProcess.StartInfo = processInfo;
batchProcess.Start();
}
}
}