I am trying to run a batch script package as part of a sharp program, the code I use is shown below:
Process proc = new Process();
proc.StartInfo.FileName = "G:\\Media\\Downloads\\print.bat";
proc.Start();
The script is simple (for testing purposes) and contains one line:
echo hello > output.txt
When I run the script from Windows Explorer, it works, but does not execute when run from C # code.
any thoughts?
Also, how can I give processes a callback method when it's done?
thank
source
share