I'm looking for a function that can get a computer's processor speed in Windows 98/ME/2000/2003/XP/Vista. Also, I want it to be compatible with multiple processor systems. Thanks
Printable View
I'm looking for a function that can get a computer's processor speed in Windows 98/ME/2000/2003/XP/Vista. Also, I want it to be compatible with multiple processor systems. Thanks
Probably the most widely compatible technology to use is WMI. There are several threads on the topic in question on our forums. ;)
Yeah, I'm currently using http://freevbcode.com/ShowCode.Asp?ID=7766 but it says that my 1.6ghz Core Duo laptop has 756mhz.
Try my example here - http://vbforums.com/showpost.php?p=1775717&postcount=3
It says 797mhz. Maybe that was the same thing as http://freevbcode.com/ShowCode.Asp?ID=7766. I think I was wrong when I said 756. Anyway, that's still not right but thanks for trying :D
Works fine for me on Xp and even on Vista.
the reason it says your cpu speed is slower than it really is, is because when your not doing any thing on your labtop it slows the cpu down, but if your doing alot of work like, playing a game or watching a dvd it should go up. well at leasts thats what mine dose.
Thats correct, forgot about that feature on certain CPUs. Supossed to help out with heat and fan speed lowers too.
What CPU do you have?
Well, HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0\~MHZ has the right value. It says it's 1596mhz.
Ah just noticed you have a laptop so its the energy saving "m" type processor.
Hey, that's weird! I just tried your code again to see what CPU it says I have:
I tried it twice and I got this the first time:
x86 Family 6 Model 14 Stepping 8
Speed: 1596 Mhz
x86 Family 6 Model 14 Stepping 8
Speed: 1595 Mhz
But this again the second time:
x86 Family 6 Model 14 Stepping 8
Speed: 798 Mhz
x86 Family 6 Model 14 Stepping 8
Speed: 797 Mhz
Is there a way to make it constant?
It could be because of the dual core? 798*2=1596?
I guess but it said 1596 one time but then I closed it and tried it again and it said 797 again.
Ok, this should be it. There is a CurrentClockSpeed and a MaxClockSpeed. Try using the oProcessor.MaxClockSpeed instead. :thumb:
Yay, thank you!
Here is the listing of all the CPU properties.
vb Code:
txtProcessor.Text = txtProcessor.Text & "AddressWidth: " & oProcessor.AddressWidth txtProcessor.Text = txtProcessor.Text & "Architecture: " & oProcessor.Architecture txtProcessor.Text = txtProcessor.Text & "Availability: " & oProcessor.Availability txtProcessor.Text = txtProcessor.Text & "Caption: " & oProcessor.Caption txtProcessor.Text = txtProcessor.Text & "ConfigManagerErrorCode: " & oProcessor.ConfigManagerErrorCode txtProcessor.Text = txtProcessor.Text & "ConfigManagerUserConfig: " & oProcessor.ConfigManagerUserConfig txtProcessor.Text = txtProcessor.Text & "CpuStatus: " & oProcessor.CpuStatus txtProcessor.Text = txtProcessor.Text & "CreationClassName: " & oProcessor.CreationClassName txtProcessor.Text = txtProcessor.Text & "CurrentClockSpeed: " & oProcessor.CurrentClockSpeed txtProcessor.Text = txtProcessor.Text & "CurrentVoltage: " & oProcessor.CurrentVoltage txtProcessor.Text = txtProcessor.Text & "DataWidth: " & oProcessor.DataWidth txtProcessor.Text = txtProcessor.Text & "Description: " & oProcessor.Description txtProcessor.Text = txtProcessor.Text & "DeviceID: " & oProcessor.DeviceID txtProcessor.Text = txtProcessor.Text & "ErrorCleared: " & oProcessor.ErrorCleared txtProcessor.Text = txtProcessor.Text & "ErrorDescription: " & oProcessor.ErrorDescription txtProcessor.Text = txtProcessor.Text & "ExtClock: " & oProcessor.ExtClock txtProcessor.Text = txtProcessor.Text & "Family: " & oProcessor.Family txtProcessor.Text = txtProcessor.Text & "InstallDate: " & oProcessor.InstallDate txtProcessor.Text = txtProcessor.Text & "L2CacheSize: " & oProcessor.L2CacheSize txtProcessor.Text = txtProcessor.Text & "L2CacheSpeed: " & oProcessor.L2CacheSpeed txtProcessor.Text = txtProcessor.Text & "LastErrorCode: " & oProcessor.LastErrorCode txtProcessor.Text = txtProcessor.Text & "Level: " & oProcessor.Level txtProcessor.Text = txtProcessor.Text & "LoadPercentage: " & oProcessor.LoadPercentage txtProcessor.Text = txtProcessor.Text & "Manufacturer: " & oProcessor.Manufacturer txtProcessor.Text = txtProcessor.Text & "MaxClockSpeed: " & oProcessor.MaxClockSpeed txtProcessor.Text = txtProcessor.Text & "Name: " & objItem.Name txtProcessor.Text = txtProcessor.Text & "OtherFamilyDescription: " & oProcessor.OtherFamilyDescription txtProcessor.Text = txtProcessor.Text & "PNPDeviceID: " & oProcessor.PNPDeviceID txtProcessor.Text = txtProcessor.Text & "PowerManagementSupported: " & oProcessor.PowerManagementSupported txtProcessor.Text = txtProcessor.Text & "ProcessorId: " & oProcessor.ProcessorId txtProcessor.Text = txtProcessor.Text & "ProcessorType: " & oProcessor.ProcessorType txtProcessor.Text = txtProcessor.Text & "Revision: " & oProcessor.Revision txtProcessor.Text = txtProcessor.Text & "Role: " & oProcessor.Role txtProcessor.Text = txtProcessor.Text & "SocketDesignation: " & oProcessor.SocketDesignation txtProcessor.Text = txtProcessor.Text & "Status: " & oProcessor.Status txtProcessor.Text = txtProcessor.Text & "StatusInfo: " & oProcessor.StatusInfo txtProcessor.Text = txtProcessor.Text & "Stepping: " & oProcessor.Stepping txtProcessor.Text = txtProcessor.Text & "SystemCreationClassName: " & oProcessor.SystemCreationClassName txtProcessor.Text = txtProcessor.Text & "SystemName: " & oProcessor.SystemName txtProcessor.Text = txtProcessor.Text & "UniqueId: " & oProcessor.UniqueId txtProcessor.Text = txtProcessor.Text & "UpgradeMethod: " & oProcessor.UpgradeMethod txtProcessor.Text = txtProcessor.Text & "Version: " & oProcessor.Version txtProcessor.Text = txtProcessor.Text & "VoltageCaps: " & oProcessor.VoltageCaps