- Set oWMI = GetObject("Winmgmts:\\.\Root\Cimv2")
- s = "网卡" & vbCrLf
- For Each i In oWMI.InstancesOf("Win32_NetworkAdapter WHERE Physicaladapter = True")
- s = s & i.Name & vbCrLf
- Next
- s = s & "声卡" & vbCrLf
- For Each i In oWMI.InstancesOf("Win32_sounddevice")
- s = s & i.Name & vbCrLf
- Next
- Wsh.Echo s
复制代码
|