Dim RunProcess As Integer = process.GetProcessesByName("run").Length Dim RunConhost As Integer = process.GetProcessesByName("conhost").Length For Each p In process.GetProcessesByName(RunConhost, RunProcess) If p.ProcessName.Length > 5 Then process.WaitForExit() process.Close() Else process.Start() Dim output As String = process.StandardOutput.ReadToEnd() RichTextBox1.Text = output process.WaitForExit() process.Close() End If Next
If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)