|
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.ConsoleAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.218-beta+101eee949414e414795e55a6e73d88938f0177b8
Syntax static member Execute :
fileName : string *
?arguments : string *
?timeout : int
(* Defaults:
let _arguments = defaultArg arguments null
let _timeout = defaultArg timeout -1
*)
-> CommandResponse
GSF.Console.Command.Execute = function(fileName, arguments, timeout);
View SourceParameters
- 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
CommandResponseA
CommandResponse containing the standard output received from command and the exit code.
Exceptions Exception | Condition |
---|
CommandException |
Exception occurs when executed command process reports standard error output or process times-out.
|
See Also