使用VB.net获取USB序列号?
谁能告诉我如何使用VB.net获取USB序列号(硬件ID)?
Can anyone tell me how to get USB serial number(Hardware ID) using VB.net?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
谁能告诉我如何使用VB.net获取USB序列号(硬件ID)?
Can anyone tell me how to get USB serial number(Hardware ID) using VB.net?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
为此,您应该使用 WMI,特别是查询 Win32_USBController 类。您想要获取的属性是DeviceID。
控制台应用程序上下文中的示例 WMI 调用可能如下所示:
您需要添加对 System.Management 和 System.Management.Instrumentation 的引用才能使用>ManagementObjectSearcher 和ManagementObject。
You should use WMI for this, specifically querying the Win32_USBController Class. The property you want to get is DeviceID.'
A sample WMI call in the context of a console application might look like this:
You would need to add references to
System.Management
andSystem.Management.Instrumentation
to use ManagementObjectSearcher and ManagementObject.