Home All Groups Group Topic Archive Search About

Find out the MAC-Adress of a server

Author
27 Jun 2006 6:04 AM
Halimaji Nijazi
Hi everybody

My application is running on a share on the server.

On Starting the application I would like to check the mac-adress of the
server, but the only information i have is the share path.

How can I get the mac-adress of the server which is sharing the drive?

Thanks alot

Nijazi Halimaji

Author
27 Jun 2006 10:39 AM
John Timney (MVP)
try this

ManagementClass myManagementClass = new
ManagementClass("Win32_NetworkAdapterConfiguration");
ManagementObjectCollection moc = myManagementClass.GetInstances();
foreach(ManagementObject mo in moc)
{
Console.WriteLine(mo["MacAddress"].ToString());
}

Regards

John Timney (MVP)


Show quoteHide quote
"Halimaji Nijazi" <t***@hotmail.com> wrote in message
news:e5pyZ%23amGHA.4164@TK2MSFTNGP03.phx.gbl...
> Hi everybody
>
> My application is running on a share on the server.
>
> On Starting the application I would like to check the mac-adress of the
> server, but the only information i have is the share path.
>
> How can I get the mac-adress of the server which is sharing the drive?
>
> Thanks alot
>
> Nijazi Halimaji
>
>