CPU Information


‘code

Dim oWMISet as SWbemObjectSet

Dim oWINameSpace As SWebmServices

Dim oWMI As SWbemObject

Dim i as Integer, intCPU as integer

Set oWMINameSpace=GetObject(“Winmgmts:”)

‘set collect object to class processor

Se oWMI=oWMINameSpace.InstancesOf (“Win32_Processor”)

intCPU=oWMISet.Count

Me.Caption=intCPU & “CPU Detected”

For each oWMI In oWMISet

Print oWMI.Name

For i=1 to IntCPU

With oWMI

Print “Description:” &  .Description

Print “ID:” &  .processorID

Print “Status:” &  .Status

Print “Mfg:” &  .Manufacturer

Print “Precentage:” & .LoadPercentage

Print “Clock Speed:” & .CurrentClockSpeed

Print “Clock Max:” & .MaxClockSpeed

Print Strung$ (70,”-“)

End with

Next i

Next oWMI

‘disposes object

Set oWMI=nothing

Set oWMISet=Nothing

Set oWMINameSpace=Nothing

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s