求获取CPU序列号的代码
求获取CPU序列号的代码,另请问一下,硬盘序列号可以改,CPU序列号是不是也可以改,因为要用此序列号生成注册码,所以这个问题比较重要。
谢谢大家 。
[解决办法]
Const strComputer As String = "."
Dim strClass As String
Dim wbemServices As Object
Dim wbemObjectSet As Object
Dim wbemObject As Object
Dim p As Object
Set wbemServices = GetObject("winmgmts:\" & strComputer)
Set wbemObjectSet = wbemServices.InstancesOf("Win32_Processor")
For Each wbemObject In wbemObjectSet
debug.Print wbemObject.ProcessorId
Next