Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 391
  • Last Modified:

Get Processor Type/Speed

I'm looking for code, or a dll, that will give me the processor speed (MHz), and Processor Type, on 95/98/2000/XP systems. It will only be used on AMD and Intel systems.

I've tried the GetCPU.dll and it didn't work very well for me. The optimal case would be actual VB code that can do this.

I'm using Visual Basic 6.

1 Solution
dankennedyAuthor Commented:
I've seen that one. It uses the GetCPU.dll. It is really close to what I want however I think it's made by Intel so for Example when I run it on my system, it says...

Manufacturer: AMD
Type: Unknown

I've also run into problems running it on dual processor systems. It doesn't report the speed correctly.
try this free ocx

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Glen A.IT Project ManagerCommented:
First, download and install WMI core for your different operating systems, find it here:


Then add to your application WMI scripts for Win32_Processor -  Code is below.  This will give it to you in different string variables.  Hope this helps!

' -------------- Code WMI_Win32_Processor ----------------

On Error Resume Next
strComputer = "." 'or you can specify a remote computer name

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Processor",,48)
For Each objItem in colItems
    strCaption = "Caption: " & objItem.Caption
    strCurrentClock = "CurrentClockSpeed: " & objItem.CurrentClockSpeed
    strDescription = "Description: " & objItem.Description
    strExtClock = "ExtClock: " & objItem.ExtClock
    strFamily = "Family: " & objItem.Family
    strL2CacheSize = "L2CacheSize: " & objItem.L2CacheSize
    strL2CacheSpeed = "L2CacheSpeed: " & objItem.L2CacheSpeed
    strCPUManufacturer = "Manufacturer: " & objItem.Manufacturer
    strMaxClockSpeed = "MaxClockSpeed: " & objItem.MaxClockSpeed
    strCPUName = "Name: " & objItem.Name
    strProcessorID = "ProcessorId: " & objItem.ProcessorId
    strProcessorType = "ProcessorType: " & objItem.ProcessorType
    strSocket = "SocketDesignation: " & objItem.SocketDesignation
    strStepping = "Stepping: " & objItem.Stepping
    Wscript.Echo "SystemName: " & objItem.SystemName

dankennedyAuthor Commented:
That WMI looks like it'll give me exactly what I want... Thanks for the help.
iain_stephenIT ManagerCommented:
I'm not sure who the maker of the software is, but we use a free utility called BGINFO - it is a slick little executable that you can run anytime (we put a command-line statement in a batch file and run it in startup) to give you a whack of useful info about any system running any version of windows, including processor info (and much more).

If you google bginfo.exe you will find it right away.  It's great for Servers and workstations.  

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now