本帖最后由 flashercs 于 2025-1-8 21:09 编辑
回复 5# 小白龙
外部程序调用- cmd /c cmd /c for /f "tokens=2 delims=={}" %A in ('wmic nic where "NetConnectionStatus=2 and Not Name like '%Wireless%'" assoc:list /resultclass:Win32_NetworkAdapterConfiguration^^^|findstr /i "IPAddress"') do (for %B in (%A) do @echo %~B)|findstr /v ":"
复制代码 6楼很可能这样- cmd /c wmic /namespace:\\\\root\\standardcimv2 path MSFT_NetIPInterface where " ConnectionState=1 and AddressFamily=2" assoc:value /resultclass:MSFT_NetIPAddress | findstr /ib "IPv4Address"
复制代码
|