Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MAC Address
Message
From
05/08/1999 05:18:36
 
 
To
04/08/1999 20:33:10
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00249967
Message ID:
00250087
Views:
25
>The MAC address is available from IPCONFIG (NT) and WINIPCFG (95-98) and can easily be dumped to a file (although messy).

Actually, IPCONFIG is available in Win9x, so the code to parse the output of IPCONFIG /ALL should work cross-platform. As an example, this is the output of IPCONFIG /ALL from a Win98 box on my home LAN. Please note that I've intentionally removed the external IP address for my system; just a bit of personal paranoia. You'll get back valid IP addresses rather than xx.xx.xxx.xx for all adapters...
Windows 98 IP Configuration



	Host Name . . . . . . . . . : ED3

	DNS Servers . . . . . . . . : 207.217.77.82

	                              207.217.120.83

	Node Type . . . . . . . . . : Hybrid

	NetBIOS Scope ID. . . . . . : 

	IP Routing Enabled. . . . . : Yes

	WINS Proxy Enabled. . . . . : No

	NetBIOS Resolution Uses DNS : No



0 Ethernet adapter :



	Description . . . . . . . . : PPP Adapter.

	Physical Address. . . . . . : 44-45-53-54-00-00

	DHCP Enabled. . . . . . . . : Yes

	IP Address. . . . . . . . . : xx.xx.xxx.xx

	Subnet Mask . . . . . . . . : 255.0.0.0

	Default Gateway . . . . . . : xx.xx.xxx.xx

	DHCP Server . . . . . . . . : 255.255.255.255

	Primary WINS Server . . . . : 

	Secondary WINS Server . . . : 

	Lease Obtained. . . . . . . : 01 01 80 12:00:00 AM

	Lease Expires . . . . . . . : 01 01 80 12:00:00 AM



1 Ethernet adapter :



	Description . . . . . . . . : NETGEAR FA310TX Fast Ethernet PCI Adapter

	Physical Address. . . . . . : 00-A0-CC-3D-7E-49

	DHCP Enabled. . . . . . . . : No

	IP Address. . . . . . . . . : 10.0.0.4

	Subnet Mask . . . . . . . . : 255.255.255.0

	Default Gateway . . . . . . : 10.0.0.1

	Primary WINS Server . . . . : 10.0.0.1

	Secondary WINS Server . . . : 

	Lease Obtained. . . . . . . : 

	Lease Expires . . . . . . . : 
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform