Re: How to get MAC address from command line / batch file in Vista?
- From: foxidrive <gotcha@xxxxxxxxxxxxxx>
- Date: Fri, 29 Feb 2008 04:23:04 +1100
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
.
- References:
- How to get MAC address from command line / batch file in Vista?
- From: Dave R.
- Re: How to get MAC address from command line / batch file in Vista?
- From: billious
- Re: How to get MAC address from command line / batch file in Vista?
- From: Dave R.
- Re: How to get MAC address from command line / batch file in Vista?
- From: billious
- Re: How to get MAC address from command line / batch file in Vista?
- From: foxidrive
- Re: How to get MAC address from command line / batch file in Vista?
- From: billious
- How to get MAC address from command line / batch file in Vista?
- Prev by Date: Re: How to get MAC address from command line / batch file in Vista?
- Next by Date: Re: How to get MAC address from command line / batch file in Vista?
- Previous by thread: Re: How to get MAC address from command line / batch file in Vista?
- Next by thread: Re: How to get MAC address from command line / batch file in Vista?
- Index(es):
Relevant Pages
|