Share this page 

Get the CPU speedTag(s): WinAPI/Registry


With NT (or better), the cpu speed is stored in the registry at
HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0
   ~Mhz (dword)
The value is the Mhz - 1 , so for 2.4 Ghz, the value is 2399.
ulong speed
string cpuname

RegistryGet( &
 "HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0", &
 "~~MHz", ReguLong!, speed)

RegistryGet( &
 "HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0", &
 "ProcessorNameString", RegString!, cpuname)
 
MessageBox(cpuname, string(speed) + "Mhz")