Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get Processor Info via vbscript

Status
Not open for further replies.

DougInCanada

Technical User
Feb 1, 2004
98
CA
Hello, People.

I am trying to find out the MHz of my PC processors by simply running a script. Unfortunately, the Scriptomatic provides me with the Win32_Processor Class but it only shows the MHz if it happens to be in the Processor's name (ie: "Mobile Intel<R> Pentium<R> 4 - M CPU 2.00GHz" as opposed to "Intel Pentium III Processor"). Is there any way of determining the actual CPU Speed via a VBScript?
 

On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Processor",,48)
For Each objItem in colItems
Wscript.Echo "Description: " & objItem.Description
Wscript.Echo "Manufacturer: " & objItem.Manufacturer
Wscript.Echo "MaxClockSpeed: " & objItem.MaxClockSpeed
Wscript.Echo "Name: " & objItem.Name
Next

I hope you find this post helpful. Please let me know if it was.

Regards,

Mark
 
Hello DougInCanada,

Further to markdmac's posting, you may also need .currentclockspeed. Add this to the echoes.
[tt]
wscript.echo "Current Clock Speed (MHz) : " & objItem.currentclockspeed
[/tt]
regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top