Skip to content

Instantly share code, notes, and snippets.

@Tokinabo
Last active March 10, 2016 16:25
Show Gist options
  • Save Tokinabo/56c6e51887df82bb3dce to your computer and use it in GitHub Desktop.
Save Tokinabo/56c6e51887df82bb3dce to your computer and use it in GitHub Desktop.
Sub ProcessorInfo()
Dim cimv2, PInfo, PItem
Dim PubStrComputer As String
PubStrComputer = "."
Set cimv2 = GetObject("winmgmts:\\" & PubStrComputer & "\root\cimv2")
Set PInfo = cimv2.ExecQuery("Select * From Win32_Processor")
For Each PItem In PInfo
MsgBox "Processor: " & PItem.Name & vbCrLf & "Id: " & PItem.ProcessorId
'Debug.Print "Processor: " & PItem.Name & vbCrLf & "Id: " & PItem.ProcessorId
Next PItem
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment