Getting friendly device names in python with windows
I want to get the name of a network interface using the device GUID.
I have an answer using "ipconfig /all"
with named parsing interface
but "ipconfig /all"
very complex ...
so i want to get how Getting friendly device names in python
but it only shows usb driver ..
I can find the GUID (actually I don't know), behind the code:
import netifaces as ni
x=ni.interfaces()
print x
this is shown as ['{CDC97813-CC28-4260-BA1E-F0CE3081DEC7}']
I want to convert the name of a friendly device like "local connection"
source to share
Instead ipconfig /all
, which is quite complex, consider these much simpler, as far as the output goes, commands:
>netsh interface show interface
Admin State State Type Interface Name
-------------------------------------------------------------------------
Enabled Connected Dedicated Wireless Network Connection
Enabled Disconnected Dedicated Local Area Connection
or
>netsh interface ip show interfaces
Idx Met MTU State Name
--- ---------- ---------- ------------ ---------------------------
13 25 1500 connected Wireless Network Connection
12 5 1500 disconnected Local Area Connection
It should be almost trivial to parse the interface name
source to share