【www.gdgbn.com--客户端相关打印】
using System.Text.RegularExpressions;
using System.Diagnostics;
public class test
{
public test
{}
public static string GetCustomerMac(string IP) //para IP is the client's IP
{
string dirResults="";
ProcessStartInfo psi = new ProcessStartInfo();
Process proc = new Process();
psi.FileName = "nbtstat";
psi.RedirectStandardInput = false;
psi.RedirectStandardOutput = true;
psi.Arguments = "-A " + IP;
psi.UseShellExecute = false;
proc = Process.Start(psi);
dirResults = proc.StandardOutput.ReadToEnd();
proc.WaitForExit();