ProcessHelper
Contains functions which can be used to start other tools.
Nested types and modules
Type | Description |
ConsoleMessage |
A record type which captures console messages |
ExecParams |
Parameter type for process execution. |
ProcessResult |
A process result including error code, message log and errors. |
Shell |
Allows to exec shell operations synchronously and asynchronously. |
Functions and values
Function or value | Description |
AlwaysSetProcessEncoding
Signature: bool
|
If set to true the ProcessHelper will start all processes with a custom ProcessEncoding. If set to false (default) only mono processes will be changed. |
asyncShellExec(args)
Signature: args:ExecParams -> Async<int>
|
Execute an external program asynchronously and return the exit code, logging output and error messages to FAKE output. You can compose the result with Async.Parallel to run multiple external programs at once, but be sure that none of them depend on the output of another. |
defaultParams
Signature: ExecParams
|
Default parameters for process execution. |
directExec(configProcessStartInfoF)
Signature: configProcessStartInfoF:(ProcessStartInfo -> unit) -> bool
|
Runs the given process, waits for its completion and returns if it succeeded. |
ensureProcessesHaveStopped name timeout
Signature: name:string -> timeout:TimeSpan -> unit
|
Waits until the processes with the given name have stopped or fails after given timeout. Parameters
|
ExecProcess(...)
Signature: configProcessStartInfoF:(ProcessStartInfo -> unit) -> timeOut:TimeSpan -> int
|
Runs the given process and returns the exit code. Parameters
|
ExecProcessAndReturnMessages(...)
Signature: configProcessStartInfoF:(ProcessStartInfo -> unit) -> timeOut:TimeSpan -> ProcessResult
|
Runs the given process and returns the process result. Parameters
|
ExecProcessElevated cmd args timeOut
Signature: cmd:string -> args:string -> timeOut:TimeSpan -> int
|
Runs the given process in an elevated context and returns the exit code. Parameters
|
ExecProcessRedirected(...)
Signature: configProcessStartInfoF:(ProcessStartInfo -> unit) -> timeOut:TimeSpan -> bool * seq<ConsoleMessage>
|
Runs the given process and returns the process result. Parameters
|
ExecProcessWithLambdas(...)
Signature: configProcessStartInfoF:(ProcessStartInfo -> unit) -> timeOut:TimeSpan -> silent:bool -> errorF:(string -> unit) -> messageF:(string -> unit) -> int
|
Runs the given process and returns the exit code. Parameters
|
fireAndForget(configProcessStartInfoF)
Signature: configProcessStartInfoF:(ProcessStartInfo -> unit) -> unit
|
Starts the given process and returns immediatly. |
getProcessesByName(name)
Signature: name:string -> seq<Process>
|
Returns all processes with the given name |
kill(proc)
Signature: proc:Process -> unit
|
Kills the given process |
killAllCreatedProcesses()
Signature: unit -> unit
|
Kills all processes that are created by the FAKE build script unless "donotkill" flag was set. |
killFSI()
Signature: unit -> unit
|
Kills the F# Interactive (FSI) process. |
killMSBuild()
Signature: unit -> unit
|
Kills the MSBuild process. |
killProcess(name)
Signature: name:string -> unit
|
Kills all processes with the given name |
killProcessById(id)
Signature: id:int -> unit
|
Kills all processes with the given id |
pathDirectories
Signature: seq<string>
|
Gets the list of valid directories included in the PATH environment variable. |
ProcessEncoding
Signature: Encoding
|
The ProcessHelper will start all processes with this encoding if AlwaysSetProcessEncoding is set to true. If AlwaysSetProcessEncoding is set to false (default) only mono processes will be changed. |
RunRemoteService(...)
Signature: command:string -> host:string -> serviceName:string -> unit
|
Sends a command to a remote windows service. |
RunService command serviceName
Signature: command:string -> serviceName:string -> unit
|
Sends a command to a local windows service. |
StartProcess(configProcessStartInfoF)
Signature: configProcessStartInfoF:(ProcessStartInfo -> unit) -> unit
|
Starts the given process and forgets about it. |
StartRemoteService host serviceName
Signature: host:string -> serviceName:string -> unit
|
Starts a remote windows service. Waits up to two minutes for a response. |
StartService(serviceName)
Signature: serviceName:string -> unit
|
Starts a local windows service. Waits up to two minutes for a response. |
StopRemoteService host serviceName
Signature: host:string -> serviceName:string -> unit
|
Stops a remote windows service. Waits up to two minutes for a response. |
StopService(serviceName)
Signature: serviceName:string -> unit
|
Stops a local windows service. Waits up to two minutes for a response. |
tryFindFileOnPath(file)
Signature: file:string -> string option
|
Searches the current directory and the directories within the PATH environment variable for the given file. If successful returns the full path to the file. Parameters
|