ManagementObjectSearcher query = null;
ManagementObjectCollection queryCollection = null;
try
{
query = new ManagementObjectSearcher("SELECT * FROM
Win32_NetworkAdapterConfiguration") ;
queryCollection = query.Get();
foreach( ManagementObject mo in queryCollection )
{
if(mo["MacAddress"] != null)
{
Console.WriteLine(mo["MacAddress"].ToString());
}
}
}
catch(Exception ex)
{
Console.WriteLine(ex.Source);
Console.WriteLine(ex.Message);
}
"shawkee" <sh*****@hotmail.com> wrote in message
news:04****************************@phx.gbl...
Anyone knows how to read the MAC address on the network
card in .NET?