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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top