System.Diagnostics.Process is not giving response - D3565 FO

Hi,

I am trying to run a batch using System.Diagnostics.Process , but it is not giving any error nor giving the result

I am using PU34

System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo myProcessStartInfo = new System.Diagnostics.ProcessStartInfo("cmd.exe");

myProcessStartInfo.Arguments = '"C:\\Users\\admin144423\\Documents\\batch1.bat"';
myProcessStartInfo.UseShellExecute = false;
myProcessStartInfo.RedirectStandardOutput = true;
myProcessStartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle::Hidden;
myProcessStartInfo.CreateNoWindow = true;
myProcess.StartInfo = myProcessStartInfo;
myProcess.Start();
myProcess.BeginOutputReadLine();

I tried the batch file from other drives as well giving shared permission, but it doesnot show any error.

On executing this bat file from command prompt, I am getting the result.

Am I missing something?

Parents Reply Children
Related
Recommended