可能重複:
Related to ProcessStartInfo() method in C#相關的ProcessStartInfo()方法在C#
我想在ProcessStartInfo(F:\\Android\\android-sdk-windows\\platform-tools>adb.exe install F:\\P1\\bin\\ANDPROJ1-debug.apk)
通過這些參數 所以我略低於這裏路過這些論點,但我得到一個例外The system cannot find the file specified
。
PLZ給我的解決方案,爲什麼這個錯誤是未來,而我是正確的檢查所有的路徑。
System.Diagnostics.ProcessStartInfo androidInstallInfo = new System.Diagnostics.ProcessStartInfo();
androidInstallInfo.FileName ="adb.exe";
androidInstallInfo.Arguments = "install F:\\P1\\bin\\ANDPROJ1-debug.apk"; //"install"+" "+ProjectLocation+"\\" + "bin\\" + ProjectName + "-debug.apk";;
androidInstallInfo.WorkingDirectory = F:\\Android\\android-sdk-windows\\platform-tools;
androidInstallInfo.RedirectStandardOutput = true;
androidInstallInfo.UseShellExecute = false;
androidInstallInfo.CreateNoWindow = true;
System.Diagnostics.Process androidProcess = new System.Diagnostics.Process();
androidProcess.StartInfo = androidInstallInfo;
androidProcess.Start();
androidProcess.Close();
你有沒有注意到的格局嗎?停止發佈重複您現有問題的新問題。如果您需要添加更多信息,請編輯您現有的問題。 – 2011-03-16 07:53:23