How do I execute an external command (exec like use)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Basically, how can I execute a command line executable from within C#. I'm
looking for something similar to C++'s exec command.

Say for example I wanted to execute foo.exe with some command line
paramaters and capture it's output.

Any hints?

Thanks,

Nathan
 
Nathan,

Use the static Start method on the Process class (or create an instance,
and set up the parameters to start the process with).

Hope this helps.
 
Back
Top