Imports System.Management
——————————————————————————————
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
Text1.Text = Uint32.ToString
网上下的,总提示Management.ManagementObjectSearcher与ManagementObject未定义类型错误。怎么办哦,急用
我电脑上读取不出来,为空值。但是没有报错。我用的win7的系统。能提供下读取CPU序列的程序吗。谢谢哦,急用
追答发现网上的那个wmi用不了,Management根本没有方法,我的代码是通过注册表获取,但没在其他系统上试过,你的是什么系统,照上面的路径,到注册表中找找看。
HKEY_LOCAL_MACHINE保存了注册表里的所有与这台计算机有关的配置信息