Câu hỏi được gắn thẻ «processstartinfo»

22
ProcessStartInfo treo trên mạng WaitForExit '? Tại sao?
Tôi có đoạn mã sau: info = new System.Diagnostics.ProcessStartInfo("TheProgram.exe", String.Join(" ", args)); info.CreateNoWindow = true; info.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; info.RedirectStandardOutput = true; info.UseShellExecute = false; System.Diagnostics.Process p = System.Diagnostics.Process.Start(info); p.WaitForExit(); Console.WriteLine(p.StandardOutput.ReadToEnd()); //need the StandardOutput contents Tôi biết rằng đầu ra từ quá trình tôi đang bắt đầu dài khoảng 7 MB. …

12
Thực hiện hàng loạt tệp trong C #
Tôi đang cố gắng thực thi một tệp bó trong C #, nhưng tôi không gặp may mắn khi làm điều đó. Tôi đã tìm thấy nhiều ví dụ trên Internet, nhưng nó không hoạt động với tôi. public void ExecuteCommand(string command) { int ExitCode; ProcessStartInfo ProcessInfo; Process Process; ProcessInfo …
Khi sử dụng trang web của chúng tôi, bạn xác nhận rằng bạn đã đọc và hiểu Chính sách cookie và Chính sách bảo mật của chúng tôi.
Licensed under cc by-sa 3.0 with attribution required.