Click or drag to resize

CommandExecute(String, String, Int32) Method

Executes a command line operation and returns its standard output and exit code or throws an exception with the standard error.

Namespace: GSF.Console
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.260-beta+c0861d169624b467814caa35d317fc192fd7b432
Syntax
public static CommandResponse Execute(
	string fileName,
	string arguments = null,
	int timeout = -1
)
View Source

Parameters

fileName  String
Command line file name to execute.
arguments  String  (Optional)
Command line arguments to use, if any.
timeout  Int32  (Optional)
Timeout, in milliseconds, to wait for command line operation to complete.

Return Value

CommandResponse
A CommandResponse containing the standard output received from command and the exit code.
Exceptions
ExceptionCondition
CommandException Exception occurs when executed command process reports standard error output or process times-out.
See Also