Method RunShellAsync
RunShellAsync(string, CancellationToken)
Runs command with the system shell and completes with whether it exited with status 0. Gives up (and
kills the command) after 30 seconds or when cancellationToken is cancelled.
public static Task<bool> RunShellAsync(string command, CancellationToken cancellationToken = default)
Parameters
commandstringcancellationTokenCancellationToken
Returns
Exceptions
- OperationCanceledException
cancellationTokenwas cancelled.