如何获取Windows系统中连接设备的详细信息 [英] How to get details of connected devices in windows system

查看:131
本文介绍了如何获取Windows系统中连接设备的详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想了解Windows系统中连接设备的详细信息。

如果在端口或usb中连接的任何打印机然后获取打印机或连接在端口或USB中的其他设备的信息。

I want to get details of connected devices in windows system.
if any printer connected in port or usb then get information of printer or another device connected in port or usb.

推荐答案

使用 ManagementObject class [ ^ ]。

使用(var运行类似的查询searcher = new ManagementObjectSearcher(@Select * From Win32_USBHub));



这是一个使用此类的示例 - 使用Windows Management Instrumentation调用获取系统信息 [ ^ ]。
Use the ManagementObject class[^].
Run a query similar to using (var searcher = new ManagementObjectSearcher(@"Select * From Win32_USBHub"));

Here is an example that uses this class - Obtain System Information Using Windows Management Instrumentation Calls[^].


这篇关于如何获取Windows系统中连接设备的详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆