Re: How to get MAC address from command line / batch file in Vista?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Fri, 29 Feb 2008 01:02:54 +0800, "billious" <billious_1954@xxxxxxxxxxx> wrote:

It needs some extra logic - here is what mine says:

Ethernet adapter Local Area Connection 4:

Curious. Any clue as to why "4"? Are there 0..3 as well, or just "4" for the
sake of "4"?

Every time you change LAN cards it will increment the number - ditto with Wireless connections.

Test your code with this ipconfig /all output - it did find the right MAC address but as you
can see the description field can contain text that could throw the code:



Windows IP Configuration

Host Name . . . . . . . . . . . . : Number5isalive
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : home

Ethernet adapter VMware Network Adapter VMnet8:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : VMware Virtual Ethernet Adapter for VMnet8
Physical Address. . . . . . . . . : 00-51-55-C0-32-3E
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.135.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :

Ethernet adapter VMware Network Adapter VMnet1:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : VMware Virtual Ethernet Adapter for VMnet1
Physical Address. . . . . . . . . : 00-51-55-C0-EA-DB
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.159.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :

Ethernet adapter Local Area Connection 4:

Connection-specific DNS Suffix . : home
Description . . . . . . . . . . . : Atheros L1 Gigabit Ethernet 10/100/1000Base-T Controller
Physical Address. . . . . . . . . : 00-1A-FE-8F-EB-AA
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 192.168.1.103
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
DNS Servers . . . . . . . . . . . : 202.34.130.33
203.37.230.23
Lease Obtained. . . . . . . . . . : Friday, 29 February 2008 00:17:08
Lease Expires . . . . . . . . . . : Saturday, 1 March 2008 00:17:08


.



Relevant Pages

  • Re: Page Cannot Be Displayed
    ... >> Mergerx.local) on either network cannot connect to either remote servers ... >> Ethernet adapter Network Connection: ... >> Connection-specific DNS Suffix. ... >> Ethernet adapter Server Local Area Connection: ...
    (microsoft.public.windows.server.sbs)
  • Re: Loosing network access to XP boxes
    ... Enable DHCP on the SBS server and set your clients to obtain an IP and DNS ... > Ethernet adapter Server Local Area Connection: ... > Connection-specific DNS Suffix. ...
    (microsoft.public.windows.server.sbs)
  • Re: Migration from sbs 2003 to 2008 standard
    ... Connection-specific DNS Suffix. ... Ethernet adapter Internet: ... Tunnel adapter Local Area Connection* 8: ...
    (microsoft.public.windows.server.active_directory)
  • Re: Network OK but internet not working on PC
    ... Ethernet adapter Local Area Connection: ... Connection-specific DNS Suffix. ... Ethernet adapter Intel Pro 1000 MT Gigabit Ethernet Adapter - onboard: ... Ping statistics for 216.239.59.99: ...
    (microsoft.public.windowsxp.general)
  • Re: missing global catalog
    ... Ethernet adapter SonicWALL Virtual Adapter: ... Ethernet adapter Local Area Connection: ... The name of my dns zone is cinco.appdancer.com and it allows dynamic updates. ... The _msdcs.gc folder did not exist. ...
    (microsoft.public.windows.server.dns)