找到USB驱动器的序列号不WMI [英] Finding serial number of USB drive without WMI

查看:95
本文介绍了找到USB驱动器的序列号不WMI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何找到一个USB驱动器的序列号没有在C#中使用WMI?

How do we find the serial number of a USB drive without using WMI in c#?

感谢

推荐答案

下面这个链接看起来像一个良好的开端,如果你可以使用WMI。 挥发性USB序列号使用C#

The following link looks like a good place to start if you can use WMI. Volatile USB Serial Number Using C#.

您可以实现一个WMI soloution,因为这看起来是非常简单的代码,并已相当extensivly测试。如果你得到一个WMI的错误,你可以优雅地落入使用非WMI调用另一个实现。

You could implement a WMI soloution as this looks like it is pretty simple code and has been fairly extensivly tested. If you get a WMI error you could gracefully fall into another implementation using non WMI calls.

要获得序列号,而无需使用WMI我建议你看一下微软脚本运行时。你可以将它添加到从COM选项卡项目的引用。

To get the serial number without using WMI I would recommend that you look at the microsoft scripting runtime. You can add this to your project references from the COM tab.

这篇关于找到USB驱动器的序列号不WMI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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