引用Microsoft WMI Scripting V1.1 Library
然后用下面的代码,将在Text1中显示出所的的信息
Private Sub GetProcessorID()
  Dim a As SWbemServices
  Dim b As SWbemObjectSet
  Dim c As SWbemObject
  Dim d As SWbemPropertySet
  Dim e As SWbemProperty
   
  Set a = GetObject("winmgmts:")
  Set b = a.InstancesOf("Win32_Processor")
  For Each c In b
     With c
       If .Properties_.Count > 0 Then
         Set d = .Properties_
         
         For Each e In d
            Text1 = Text1 & e.Name & ":  " & e.Value & vbCrLf
         Next
       End If
     End With
  Next
End SubPrivate Sub Form_Load()
  GetProcessorID
End Sub

解决方案 »

  1.   

    请问在我的电脑中,W98 操作系统,VB6。0 ,SP4补丁,可找不到Microsoft WMI Scripting V1.1 Library,请怎么解决???
      

  2.   

    可能对你有帮助:http://www.csdn.net/expert/topic/628/628803.xml?temp=.7230341
    如何在VB里实现直接到硬件的操作
      

  3.   

    引用Microsoft WMI Scripting V1.1 Library
    然后用下面的代码,将在Text1中显示出所的的信息
    Private Sub GetProcessorID()
      Dim a As SWbemServices
      Dim b As SWbemObjectSet
      Dim c As SWbemObject
      Dim d As SWbemPropertySet
      Dim e As SWbemProperty
       
      Set a = GetObject("winmgmts:")
      Set b = a.InstancesOf("Win32_Processor")
      For Each c In b
         With c
           If .Properties_.Count > 0 Then
             Set d = .Properties_
             
             For Each e In d
                Text1 = Text1 & e.Name & ":  " & e.Value & vbCrLf
             Next
           End If
         End With
      Next
    End SubPrivate Sub Form_Load()
      GetProcessorID
    End Sub
      

  4.   

    哪里有sp6?我在微软网站都没看到,是e文的先出了么?
      

  5.   

    http://www.csdn.net/Expert/TopicView1.asp?id=928731