惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
M
MIT News - Artificial intelligence
罗磊的独立博客
博客园 - 【当耐特】
A
About on SuperTechFans
Last Week in AI
Last Week in AI
雷峰网
雷峰网
IT之家
IT之家
aimingoo的专栏
aimingoo的专栏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园_首页
博客园 - 叶小钗
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - Franky
J
Java Code Geeks
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
Docker
Engineering at Meta
Engineering at Meta
B
Blog RSS Feed
The Cloudflare Blog
大猫的无限游戏
大猫的无限游戏
阮一峰的网络日志
阮一峰的网络日志
S
SegmentFault 最新的问题
Recent Announcements
Recent Announcements

博客园 - 点点小铺

招聘Delphi程序员,懂.Net----广州地区(08年4月1日前有效) 用C# 实现C/S模式下软件自动在线升级 判断一个字符串是否全是数字的多种方法及其性能比较(C#实现)--来源CSDN 使用ADOX创建Access数据库和表-- 来源于CSDN 运用C#制作屏幕捕捉程序(2) 运用C#制作屏幕捕捉程序(1) 探讨C#中字符串的加密 在 C# 中加载自己编写的动态链接库 用C#生成随机中文汉字验证码的基本原理 C#中如何读写INI文件 c#中结构与类的区别 C#中对注册表的操作 C#中调用Windows API的要点 C#的多线程机制初探(4) C#的多线程机制初探(3) C#的多线程机制初探(2) C#的多线程机制初探(1) C#中如何插入照片到Excel C#编程让Outlook乖乖交出帐户密码
通过WMI获得硬盘和CPU的物理序列号
点点小铺 · 2006-10-09 · via 博客园 - 点点小铺

'获得硬盘序列号

Dim cmicWmi As New System.Management.ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive")

Dim Uint32 As UInt32

For Each cmicWmiObj As ManagementObject In cmicWmi.Get

Uint32 = cmicWmiObj("signature")

Next

TextBox1.Text = Uint32.ToString

''获得CPU序列号

Dim Wmi As New System.Management.ManagementObjectSearcher("SELECT * FROM Win32_Processor")

Dim Uint32 As String

For Each WmiObj As ManagementObject In Wmi.Get

Uint32 = WmiObj("ProcessorId")

Next

TextBox1.Text = Uint32

''获得硬盘总容量

Dim Wmi As New System.Management.ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive")

Dim Uint64 As UInt64

For Each WmiObj As ManagementObject In Wmi.Get

Uint64 = WmiObj("size")

Next

TextBox1.Text = Uint64.ToString

首先,引用System.Management;然后在代码中Imports System.Management