Table of Contents

Method ExecuteTerminalCommand

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

ExecuteTerminalCommand(string, string?, bool, bool)

Executes terminal command redirecting output and error streams to Log(object?, LogItemKind).

public static AppUtils.ExecuteTerminalCommandResult ExecuteTerminalCommand(string command, string? folder = null, bool waitResult = false, bool logStdOut = true)

Parameters

command string

Terminal command.

folder string

Value of WorkingDirectory.

waitResult bool

Whether to wait until command finishes its execution.

logStdOut bool

Specifies whether to hook and log standard output and standard error streams.

Returns

AppUtils.ExecuteTerminalCommandResult

Result of the command execution in case when waitResult is true; otherwise null.