如何获取硬盘序列号 [英] howto get harddisk serial number
本文介绍了如何获取硬盘序列号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在.NET中获取硬盘的序列号?
我希望它是相同的数字,即使用户已经重新格式化了b $ b,所以我不想要卷序列号。
Thanx,
t
解决方案
您需要使用WMI(System.Management)来查询Win32_PhysicalDisk。一些
硬盘不会给你b $ b给你一个序列号(可能是空的,所以要做好准备)。
-mike < br $> b $ b MVP
" tom" <一个******* @ discussions.microsoft.com>在消息中写道
news:04 **************************** @ phx.gbl ... < blockquote class =post_quotes>
如何在.NET中获取硬盘的序列号?
我希望这个数字是相同的数字,即使用户已重新格式化,因此我不需要卷序列号。
Thanx,
t
是否有一种更好的方式让我能够独一无二地确定运行我的软件的电脑是什么?
总能在任何计算机上工作?
thanx,
t
-----原帖-----
您需要使用WMI(System.Management)来查询
Win32_PhysicalDisk。一些硬盘不会给你一个序列号(它可能是空的,所以准备好为
).-迈克
MVP
汤姆 <一个******* @ discussions.microsoft.com>写在
messagenews:04 **************************** @ phx.gbl ...
如何在.NET中获取硬盘的序列号?
我希望这个号码是相同的号码,即使用户有
重新格式化,所以我不想要卷序列号。
Thanx,
t
。
每次安装制作一个GUID或者使用WMI或者系统信息类
" tom" <一个******* @ discussions.microsoft.com>在消息中写道
news:04 **************************** @ phx.gbl ... < blockquote class =post_quotes>是否有一种更好的方法可以让我唯一地识别运行我的软件的电脑,它将始终在任何计算机上工作?
> thanx,
-----原始消息-----
您需要使用WMI(System.Management)查询
Win32_PhysicalDisk。一些硬盘不会给你一个序列号(可能是null,所以
为此做好准备)。-mike
MVP
tom <一个******* @ discussions.microsoft.com>写在
消息新闻:04 **************************** @phx.gbl ...
如何在.NET中获取硬盘的序列号?
我想要这个即使用户已重新格式化,也是相同的数字,所以我不想要卷序列号。
Thanx,
t
。
Hi,
How do I get the serial number of the harddisk in .NET?
I want this to be the same number even if the user has
reformatted, so I do not want the volume serial number.
Thanx,
t
解决方案
You need to use WMI (System.Management) to query Win32_PhysicalDisk. Some
hard disks will not
give you a serial number (it might be null, so be prepared for that).
-mike
MVP
"tom" <an*******@discussions.microsoft.com> wrote in message
news:04****************************@phx.gbl...Hi,
How do I get the serial number of the harddisk in .NET?
I want this to be the same number even if the user has
reformatted, so I do not want the volume serial number.
Thanx,
t
Is there than a better way that allows me to uniquely
identify the pc where my software is running on that will
work always on any computer?
thanx,
t
-----Original Message-----
You need to use WMI (System.Management) to query Win32_PhysicalDisk. Somehard disks will not
give you a serial number (it might be null, so be prepared for that).-mike
MVP
"tom" <an*******@discussions.microsoft.com> wrote in messagenews:04****************************@phx.gbl...Hi,
How do I get the serial number of the harddisk in .NET?
I want this to be the same number even if the user has
reformatted, so I do not want the volume serial number.
Thanx,
t
.
Make a GUID per install or use WMI perhaps or SystemInformation class
"tom" <an*******@discussions.microsoft.com> wrote in message
news:04****************************@phx.gbl...Is there than a better way that allows me to uniquely
identify the pc where my software is running on that will
work always on any computer?
thanx,
t-----Original Message-----
You need to use WMI (System.Management) to query
Win32_PhysicalDisk. Somehard disks will not
give you a serial number (it might be null, so be
prepared for that).-mike
MVP
"tom" <an*******@discussions.microsoft.com> wrote in
messagenews:04****************************@phx.gbl...Hi,
How do I get the serial number of the harddisk in .NET?
I want this to be the same number even if the user has
reformatted, so I do not want the volume serial number.
Thanx,
t
.
这篇关于如何获取硬盘序列号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文