public static Process AddBackgroundProcess(this IProcessProvider provider, string key, string command, string args) { var process = new Process { EnableRaisingEvents = true, StartInfo = { FileName = command, Arguments = args, CreateNoWindow = true, UseShellExecute = false, RedirectStandardError = true, RedirectStandardOutput = true, }, }; provider.AddProcess(key, process); return(process); }