Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CPU Type and Speed
#10
So, if we wanted to also include the motherboard manufacturer, BIOS version, and computer model name:

Code: (Select All)
Option Explicit
$NoPrefix
$Console:Only

'$Include:'WinReg.BI'

Dim As Unsigned Long procSpeed, biosMajor, BiosMinor
Dim As String procName, BiosVersion, systemVersion, systemManufacturer

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

If ReadREG_SZ(HKEY_LOCAL_MACHINE, "HARDWARE\DESCRIPTION\System\BIOS", "SystemManufacturer", systemManufacturer) = REG_TRUE Then
    Print "System Manufacturer:  "; systemManufacturer
End If
If ReadREG_SZ(HKEY_LOCAL_MACHINE, "HARDWARE\DESCRIPTION\System\BIOS", "SystemVersion", systemVersion) = REG_TRUE Then
    Print "System Version:      "; systemVersion
End If

If ReadREG_DWORD(HKEY_LOCAL_MACHINE, "HARDWARE\DESCRIPTION\System\BIOS", "BiosMajorRelease", biosMajor) = REG_TRUE Then
    If ReadREG_DWORD(HKEY_LOCAL_MACHINE, "HARDWARE\DESCRIPTION\System\BIOS", "BiosMinorRelease", BiosMinor) = REG_TRUE Then
        Print Using "BIOS Version:        ##_.##"; biosMajor; BiosMinor
    End If
End If

'$Include:'WinReg.BM'


[Image: image.png]
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: 3 Guest(s)