本帖最后由 a20150604 于 2021-9-11 14:25 编辑
列出所有有线网卡名- For Each Instance In GetObject("WINMGMTS:\\.\ROOT\WMI").ExecQuery("Select * from MSNdis_PhysicalMediumType Where NdisPhysicalMediumType = 0 or NdisPhysicalMediumType = 14")
- Wscript.Echo Instance.InstanceName
- Next 'Instance
复制代码 参考- ' https://docs.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_if_row2
- ' ntddndis.h
-
- ' typedef enum _NDIS_PHYSICAL_MEDIUM {
- ' NdisPhysicalMediumUnspecified, // 0
- ' NdisPhysicalMediumWirelessLan, // 1
- ' NdisPhysicalMediumCableModem, // 2
- ' NdisPhysicalMediumPhoneLine, // 3
- ' NdisPhysicalMediumPowerLine, // 4
- ' NdisPhysicalMediumDSL, // 5
- ' NdisPhysicalMediumFibreChannel, // 6
- ' NdisPhysicalMedium1394, // 7
- ' NdisPhysicalMediumWirelessWan, // 8
- ' NdisPhysicalMediumNative802_11, // 9
- ' NdisPhysicalMediumBluetooth, // 10
- ' NdisPhysicalMediumInfiniband, // 11
- ' NdisPhysicalMediumWiMax, // 12
- ' NdisPhysicalMediumUWB, // 13
- ' NdisPhysicalMedium802_3, // 14
- ' NdisPhysicalMedium802_5, // 15
- ' NdisPhysicalMediumIrda, // 16
- ' NdisPhysicalMediumWiredWAN, // 17
- ' NdisPhysicalMediumWiredCoWan, // 18
- ' NdisPhysicalMediumOther, // 19
- ' NdisPhysicalMediumMax // 20
- ' } NDIS_PHYSICAL_MEDIUM,*PNDIS_PHYSICAL_MEDIUM;
复制代码
|