联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
Windows IP Configuration Host Name . . . . . . . . . . . . : IBM_T60_HGX Primary Dns Suffix . . . . . . . : Node Type . . . . . . . . . . . . : Unknown IP Routing Enabled. . . . . . . . : Yes WINS Proxy Enabled. . . . . . . . : No Ethernet adapter 无线网络连接: Media State . . . . . . . . . . . : Media disconnected Description . . . . . . . . . . . : Intel(R) PRO/Wireless 3945ABG Network Connection Physical Address. . . . . . . . . : 00-13-02-A3-F9-18 Ethernet adapter 本地连接: Media State . . . . . . . . . . . : Media disconnected Description . . . . . . . . . . . : Intel(R) PRO/1000 PL Network Connection Physical Address. . . . . . . . . : 02-80-41-59-C7-2C Ethernet adapter 本地连接 2: Media State . . . . . . . . . . . : Media disconnected Description . . . . . . . . . . . : VPN Virtual Network Adapter Physical Address. . . . . . . . . : 00-00-00-14-35-22
for /f "tokens=2 delims=:" %%l in ('ipconfig /all ^| find /i "Physical Address"') do set mac=%%l echo 本机MAC地址为:%mac% pause
@echo off&setlocal enabledelayedexpansion for /f "tokens=3 delims=:. " %%l in ('ipconfig /all') do ( set /a n+=1 if "%%l"=="本地连接" (set flag=1&set n=1) if defined flag if !n! equ 4 (echo;本机mac地址是:%%l&pause&goto :eof) )
if "%%l"=="本地连接" (set n=1) if !n! equ 4 (echo;本机mac地址是:%%l)