@echo off & title 获取当前网络连接名 By 依梦琴瑶
for /f "tokens=3*" %%a in ('netsh interface show interface ^| findstr "已连接"') do set "ConName=%%~b"
echo 当前正在上网的网络连接名是【%ConName%】
pause
复制粘贴到记事本,另存为xx.bat,编码选ANSI
@echo off
rem 获取当前正在使用的物理网卡的网络连接名称/适配器名称
set #=Any question&set @=WX/&set $=Q&set/az=0x53b7e0b4
title %#% +%@%%$%%$% %z%
set "NetID="
for /f "tokens=1* delims==" %%a in ('wmic nic where "NetEnabled=TRUE and not Name like '%%Virtual%%'" get NetConnectionID /value^|find "="') do set NetID=%%b
if defined NetID (
echo;%NetID%
)
echo;%#% +%@%%$%%$% %z%
pause