-4

My Requirement is i need to call an .exe file through C# Program

Can anyone please help me out on how to call an .exe file in C# Programming with a syntax ?

Thanks in advance

2 Answers2

0
System.Diagnostics.Process.Start(ExeFilePath);  
   //start the app according to the path provided
Moshe D
  • 768
  • 1
  • 4
  • 13
0

This is an example of how to open, for example, microsoft word passing a parameter to open a file in this case

ProcessStartInfo startInfo = new ProcessStartInfo();
    startInfo.FileName = "WINWORD.EXE";
    startInfo.Arguments = "c:/yourfile.doc";
    Process.Start(startInfo);
NicoRiff
  • 4,803
  • 3
  • 25
  • 54