Private static void merge command (string strIp)
{
Process p = new Process ();
// Set the program name
P. StartInfo. FileName = "cmd.exe ";
// Close Shell usage
P. StartInfo. UseShellExecute = false;
// Redirect standard input
P. StartInfo. RedirectStandardInput = true;
// Redirect standard output
P. StartInfo. RedirectStandardOutput = true;
// Redirect error output
P. StartInfo. RedirectStandardError = true;
// Set not to display the window
P. StartInfo. CreateNoWindow = true;
// String pingrst;
P. Start ();
P. StandardInput. WriteLine (strIp );
P. StandardInput. WriteLine ("exit ");
String strRst = p. StandardOutput. ReadToEnd ();
// If (strRst. IndexOf ("(0% loss )")! =-1)
// Pingrst = "connection ";
// Else if (strRst. IndexOf ("Destination host unreachable .")! =-1)
// Pingrst = "unable to reach the target host ";
// Else if (strRst. IndexOf ("Request timed out .")! =-1)
// Pingrst = "timeout ";
// Else if (strRst. IndexOf ("Unknown host ")! =-1)
// Pingrst = "unable to Resolve Host ";
// Else
// Pingrst = strRst;
P. Close ();
// Return pingrst;
}