process


Process cmd = new Process();
cmd.StartInfo.FileName = "systeminfo.exe";
cmd.StartInfo.UseShellExecute = false;
cmd.StartInfo.RedirectStandardInput = true; 
cmd.StartInfo.RedirectStandardOutput = true;
cmd.StartInfo.CreateNoWindow = true;
cmd.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
cmd.Start();
this.textBox1.Text = cmd.StandardOutput.ReadToEnd();
cmd.WaitForExit();
cmd.Close();
posted @ 2009-09-28 15:51  greencolor  阅读(219)  评论(0编辑  收藏  举报