CPU Type and Speed
#6
@TerryRitchie

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'
[Image: image.png]
I divided by 1,000 because the value is in MHz, not GHz


Attached Files
.bi   WinReg.BI (Size: 450 bytes / Downloads: 81)
.bm   WinReg.BM (Size: 32.29 KB / Downloads: 85)
Schuwatch!
Yes, it's me. Now shut up.
Reply


Messages In This Thread
CPU Type and Speed - by TerryRitchie - 06-07-2023, 08:26 PM
RE: CPU Type and Speed - by mnrvovrfc - 06-07-2023, 09:37 PM
RE: CPU Type and Speed - by Ultraman - 06-07-2023, 09:42 PM
RE: CPU Type and Speed - by SMcNeill - 06-07-2023, 10:22 PM
RE: CPU Type and Speed - by SMcNeill - 06-07-2023, 10:23 PM
RE: CPU Type and Speed - by Ultraman - 06-09-2023, 03:35 PM
RE: CPU Type and Speed - by TerryRitchie - 06-09-2023, 03:52 PM
RE: CPU Type and Speed - by Ultraman - 06-09-2023, 05:05 PM
RE: CPU Type and Speed - by TerryRitchie - 06-09-2023, 05:10 PM
RE: CPU Type and Speed - by Ultraman - 06-09-2023, 05:20 PM
RE: CPU Type and Speed - by Ultraman - 06-09-2023, 05:22 PM
RE: CPU Type and Speed - by TerryRitchie - 06-09-2023, 08:49 PM



Users browsing this thread: 8 Guest(s)