06-09-2023, 03:52 PM
(06-09-2023, 03:35 PM)Ultraman Wrote: @TerryRitchieExcellent! Thank you. It's as simple as looking in the registry for the info. Much easier than I imagined.
Here you go.
Code: (Select All)Option Explicit
$NoPrefix
$Console:Only
'$Include:'WinReg.BI'
Dim As Unsigned Long procSpeed
Dim As String procName
If ReadREG_SZ(HKEY_LOCAL_MACHINE, "HARDWARE\DESCRIPTION\System\CentralProcessor\0", "ProcessorNameString", procName) = REG_TRUE Then
Print "Processor:", procName
End If
If ReadREG_DWORD(HKEY_LOCAL_MACHINE, "HARDWARE\DESCRIPTION\System\CentralProcessor\0", "~MHz", procSpeed) = REG_TRUE Then
Print "Processor Speed:", procSpeed / 1000; "GHz"
End If
'$Include:'WinReg.BM'
I divided by 1,000 because the value is in MHz, not GHz