I am trying to execute an exe which accepts 5 arguments from command prompt using C# script.
I am able to run the exe directly by executing the following command in command prompt:
F:ExePathDebugCreateReport.exe 102 F:ReportFiles TestReportName 2024-07-16 http://ServerName/ReportServer
For C# I used the following approach:
string strCmdText;
strCmdText = @"F:ExePathDebugCreateReport.exe 102 F:ReportFiles TestReportName 2024-07-16 http://ServerName/ReportServer";
System.Diagnostics.Process.Start("CMD.exe", strCmdText);
For the command details, first one is the exe path, then the arguments report id, file path, report name, date and server url to execute the exe.
I also tried couple of few other ways to pass the command in Process.Start
method to execute the exe, but haven’t been able to.