Summary
Starts the process resource that is specified by the filename.
- Namespace
- Cake
.Common - Containing Type
- ProcessAliases
Syntax
[CakeMethodAlias]
public static int StartProcess(this ICakeContext context, FilePath fileName)
Examples
var exitCodeWithoutArguments = StartProcess("ping");
// This should output 1 as argument is missing
Information("Exit code: {0}", exitCodeWithoutArguments);
Attributes
Type | Description |
---|---|
Cake |
An attribute used to mark script method aliases. |
Parameters
Name | Type | Description |
---|---|---|
context | ICakeContext | The context. |
fileName | FilePath | The file name. |
Return Value
Type | Description |
---|---|
int | The exit code that the started process specified when it terminated. |