06-09-2023, 05:20 PM
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'
Schuwatch!
Yes, it's me. Now shut up.
Yes, it's me. Now shut up.