///
/// 执行命令提示
///
public static void ExecConsoleCommand(string _Command)
{
Process p = new Process();
p.StartInfo.FileName = Application.StartupPath + "\\Regedit\\cmd.exe";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = true;
p.Start();
string strOutput = null;
p.StandardInput.WriteLine(_Command);
p.StandardInput.WriteLine("exit");
strOutput = p.StandardOutput.ReadToEnd();
//记录日志
Utils.CreateTextFile(System.Environment.CurrentDirectory + "\\WinRarLogs\\" + System.Guid.NewGuid().ToString("N") + ".txt", strOutput);
p.WaitForExit();
p.Close();
}