Table of Contents

Method RunShellCommandAndWaitResult

Namespace
Alternet.Common
Assembly
Alternet.Common.v10.dll

RunShellCommandAndWaitResult(string, string?, bool)

Executes a shell command and waits for the result.

public static string? RunShellCommandAndWaitResult(string command, string? arguments = null, bool multiLineResult = false)

Parameters

command string

The shell command to execute.

arguments string

Optional arguments to pass to the command.

multiLineResult bool

If true, the method returns the full output of the command. If false, only the first line of the output is returned.

Returns

string

The output of the command if successful; otherwise, null.