Fixing "get MAC address" to include wireless interfaces

With Wi-Fi adapters, they often do not show as physical adapters, hence that needs to be turned off. Instead, I add a caption to better identify Wi-Fi and Gigabit Ethernet.
This commit is contained in:
Pavel Valach 2024-10-07 23:07:35 +02:00
parent 6e9bd3f3e0
commit 7e112b0552

View file

@ -191,7 +191,7 @@ goto main
:print_mac :print_mac
cls cls
wmic nic where 'NOT Manufacturer like "%%Microsoft%%" and PhysicalAdapter=TRUE and NOT Manufacturer like "%%Windows%%"' get Manufacturer,MACAddress,NetConnectionID 2>nul wmic nic where 'NOT Manufacturer like "%%Microsoft%%" and NOT Manufacturer like "%%Windows%%"' get MACAddress,Caption,NetConnectionID 2>nul
IF NOT %ERRORLEVEL% EQU 0 ( IF NOT %ERRORLEVEL% EQU 0 (
getmac /v 2>nul getmac /v 2>nul
IF NOT %ERRORLEVEL% EQU 0 ( IF NOT %ERRORLEVEL% EQU 0 (