This project is read-only.
INTRODUCTION

Lets you run a console program from managed .Net code.

Contains class ConsoleProgram, which contains static method Execute:

public static int Execute(
string workingDirectory, string exePath, string arguments,
out string stdOut, out string stdErr)

PARAMETERS

summary

Runs a console program. Similar to opening a command line and running the console program from there.

Starts a process running the program, waits for it to finish
and returns whatever it wrote to standard output and stanard error.


workingDirectory

Working directory for the program.

If this is relative, it is taken to be relative to the
current directory of the currently running assembly.


exePath

Path to the executable to be run.

If this is relative, it is taken to be relative to the
current directory of the currently running assembly.


arguments

Arguments to the program.


stdOut

Whatever the program wrote to standard output.


stdErr

Whatever the program wrote to standard error.


returns

Exit code of the program.


EXAMPLE

string stdOut;
string stdErr;
ExecConsoleProgram.ConsoleProgram.Execute(
@"workdir", @"myprogram.exe", @"param1 param2 param3",
out stdOut, out stdErr);

Last edited Jul 11, 2012 at 2:35 AM by mperdeck, version 11