GitCommands.GitCommands.RunCmdAsync C# (CSharp) Method

RunCmdAsync() private method

private RunCmdAsync ( string cmd, string arguments ) : Process
cmd string
arguments string
return Process
        public static Process RunCmdAsync(string cmd, string arguments)
        {
            var process = new Process();
            try
            {
                SetEnvironmentVariable();

                Settings.GitLog.Log(cmd + " " + arguments);
                //process used to execute external commands

                process.StartInfo.UseShellExecute = true;
                process.StartInfo.ErrorDialog = true;
                process.StartInfo.RedirectStandardOutput = false;
                process.StartInfo.RedirectStandardInput = false;
                process.StartInfo.RedirectStandardError = false;

                process.StartInfo.LoadUserProfile = true;
                process.StartInfo.CreateNoWindow = false;
                process.StartInfo.FileName = cmd;
                process.StartInfo.Arguments = arguments;
                process.StartInfo.WorkingDirectory = Settings.WorkingDir;
                process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
                process.StartInfo.LoadUserProfile = true;

                process.Start();
            }
            catch (Exception ex)
            {
                Trace.WriteLine(ex);
            }

            return process;
        }
GitCommands