111,098
社区成员




Dim proc As System.Diagnostics.Process
proc = New System.Diagnostics.Process
proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
proc.StartInfo.CreateNoWindow = True
proc.StartInfo.UseShellExecute = False
proc.StartInfo.RedirectStandardOutput = True
proc.StartInfo.FileName = "cmd.exe"
proc.StartInfo.WorkingDirectory = Environment.GetFolderPath(Environment.SpecialFolder.System)
proc.StartInfo.Arguments = "/c ping www.baidu.com" '执行ping命令
proc.Start()
proc.WaitForExit()
MessageBox.Show(proc.StandardOutput.ReadToEnd)