2011-05-06 26 views
0

我使用VB.Net通過Process.StartInfo啓動多個命令行窗口(同一個exe文件)。我想讓這些窗口在後臺運行,而不掛上啓動它們的主UI線程,同時能夠獲得這些外部窗口的輸出以顯示進度條上的進度。VB.Net通過Process.Startinfo啓動多個命令行

這裏是我想要達到的總結,但還需要進一步提醒其方式是可行的

- launch multiple exe command through Process.StartInfo 
- don't want the external exe to hang my main UI thread 
- need to get feedback from external exe to update progress bar which is placed at main UI thread 

讓我知道我是否應該提供更多的信息。非常感謝

回答

0
  • 使用的Process.Start()開始每個過程
  • 不叫WaitForExit()
  • 添加事件處理程序的Exited事件,所以你可以報告反饋