PDA

View Full Version : How to get MAC w/o network conection



Pazan
07-29-2009, 04:57 AM
I have some trouble:


lan = System.GetLANInfo();
Paragraph.SetText("IP Address: "..lan.IP.."\nMAC: "..lan.NIC);

When PC is not conected to switch/hub I get result like that:

IP Address: 127.0.0.1
MAC: None

How to get real data not localhost in this case?

longedge
07-29-2009, 06:03 AM
If your computer is not connected to a network, you can't get the network address - none exists.

The loopback address is the only one available. Type "ipconfig /all" in a command prompt to show all the information about your IP and network adapter/s.

Pazan
07-29-2009, 11:10 AM
So, this not exactly I want. I know about Loopback device and ipconfig command, but I would to get some information about customers PCs.
I need these 2 parameters (IP/MAC) for run projects.
If MAC is in blacklist, project not run on this machine.
Maybe anyone can show other ways to resolve this?