I want to run bat file on using System.Diagnostics
and I did. But I have a problem.
public static void RunMiningProgram(string appPath, string batFilePath)
{
for (int i = 0; i < 2; i++)
{
using (Process p = new Process())
{
p.StartInfo.FileName = $"{appPath}\\{batFilePath}";
p.StartInfo.WorkingDirectory = appPath;
p.Start();
}
}
}
var path = @"D:\PROJECTS\ies-disk\asp-net-core\IesDisk.ApiProcess\wwwroot\C.bat";
var appath = @"D:\PROJECTS\ies-disk\asp-net-core\IesDisk.ApiProcess\wwwroot";
RunMiningProgram(apppath, path);
When we run the program, the results of the bat files appear on the console screen that Kestrel opens. How can I open two different cmd applications instead of showing them in the Kestrel console.
if i visualize my question i want two different cmd screens to open.