I am attempting to ping a local computer from my C# program. To accomplish this, I\'m using the following code.
System.Diagnostics.ProcessStartInfo proc = ne
public void ExecuteCommand(String command)
{
Process p = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "cmd.exe";
startInfo.Arguments = @"/c " + command; // cmd.exe spesific implementation
p.StartInfo = startInfo;
p.Start();
}
Usage: ExecuteCommand(@"ping google.com -t");