1 頁 (共 1 頁)

[c#]如何執行外部程式(起新process)

發表於 : 2008年 11月 26日, 03:05
tim
利用 System.Diagnostics 裡的 Process.Start 起動 ProcessStartInfo 資料即可, 範例如下:

代碼: 選擇全部

      System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo(); 
      psi.FileName = "notepad.exe"; 
      psi.Arguments = "c:\1.txt"; 
      System.Diagnostics.Process.Start(psi);