0

Below is my command i execute over command line in Windows.

C:\>"C:\application.exe" "C:\filename.txt" 2>> "C:\errorlog.log"

This command below works without log file, but i would like to add the output into log file.

System.Diagnostics.Process.Start(@"""C:\application.exe"", @"""C:\filename.txt""");

I would like to do the same in C#, but it doesn't work for me, this is my code i have now:

System.Diagnostics.Process.Start(@"""C:\application.exe"", @"""C:\filename.txt"" 2>> ""C:\errorlog.log""");

Thank you

Bushwacka
  • 865
  • 4
  • 12
  • 22

1 Answers1

0

send parameters as string :

try this:

System.Diagnostics.Process.Start(@"C:\application.exe" , @"C:\filename.txt 2>> C:\errorlog.log");
Saeid Doroudi
  • 935
  • 1
  • 9
  • 25