回复 2# CrLf
感谢巡查的帮助,不过还是不行,一样是多输出回车。
有网友帮我弄好了:- @echo off
- setlocal enabledelayedexpansion
- echo 正在获取本地网卡物理地址...
- for /f "tokens=1,2,3,4,5,6 delims=:" %%i in ('wmic nic where "netconnectionid='本地连接'" get macaddress') do (set /a a+=1
- if !a!==2 set "CardMac_=%%i-%%j-%%k-%%l-%%m-%%n")
- echo !CardMac_!
- pause
复制代码
|