Summary
Starts the process resource that is specified by the filename and arguments.
Syntax
[CakeMethodAlias]
public static int StartProcess(this ICakeContext context, FilePath fileName, string processArguments)
Examples
var exitCodeWithArgument = StartProcess("ping", "localhost");
// This should output 0 as valid arguments supplied
Information("Exit code: {0}", exitCodeWithArgument);
Attributes
Parameters
Name |
Type |
Description |
context |
ICakeContext |
The context. |
fileName |
FilePath |
Name of the file. |
processArguments |
string |
The arguments used in the process settings. |
Return Value
Type |
Description |
int |
The exit code that the started process specified when it terminated. |