private void Form1_Load(object sender, EventArgs e)
{
String cmd = Application.StartupPath + "\\adb\\adb.exe";
//ProcessStartInfo psi = null;
//psi = new ProcessStartInfo(cmd, "devices");
//Process p = Process.Start(psi);
Process p = new Process();
p.StartInfo.FileName = cmd; //设定程序名
p.StartInfo.Arguments = "devices"; //设定程式执行參數
p.StartInfo.UseShellExecute = false; //关闭Shell的使用
p.StartInfo.RedirectStandardInput = true; //重定向标准输入
p.StartInfo.RedirectStandardOutput = true; //重定向标准输出
p.StartInfo.RedirectStandardError = true; //重定向错误输出
p.StartInfo.CreateNoWindow = true; //设置不显示窗口
p.Start();
this.label1.Text = p.StandardOutput.ReadToEnd();
p.Close();
}