CPU und RAM Modell herausfinden

  • Hallo zusammen,

    wie kann ich von der CPU das Modell herausfinden und die Stärke von CPU und RAM?
    Es gibt zwar Funktionen, wie man die Stärke herausfindet, aber ich glaube nicht das Modell...

    LG Flo

  • kann mich nur wiederholen auch hier weiß Oscar wie es geht ;)

    Achtung Anfänger! :whistling:

    Betrachten des Quellcodes auf eigene Gefahr, bei Übelkeit,Erbrechen,Kopfschmerzen übernehme ich keine Haftung. 8o

    • Offizieller Beitrag

    Na gut, dann hier die anderen Funktionen:

    Spoiler anzeigen
    [autoit]


    #include <Array.au3>
    $aCPU = _CI_GetCPU()
    _ArrayDisplay($aCPU, 'Prozessor(en)')
    $aRAM = _CI_GetRAM()
    _ArrayDisplay($aRAM, 'Arbeitsspeicher')

    [/autoit] [autoit][/autoit] [autoit]

    Func _CI_GetCPU($strComputer = '.')
    Local $aReturn[2][12] = [[ _
    'Prozessor:', 'Name:', 'Beschreibung:', 'Sockel:', 'Taktfrequenz:', 'Ext. Taktfrequenz:', 'Spannung:', _
    'Adress-Bitbreite:', 'Daten-Bitbreite:', 'Prozessor-ID:', '', '']]
    Local $x = 0, $objWMIService, $colItems
    $objWMIService = ObjGet('winmgmts:\\' & $strComputer & '\root\cimv2')
    If Not IsObj($objWMIService) Then Return SetError(1, 0, 0)
    $colItems = $objWMIService.ExecQuery('SELECT * FROM Win32_Processor', 'WQL', 0x30)
    If IsObj($colItems) Then
    For $objItem In $colItems
    $x += 1
    ReDim $aReturn[$x + 1][12]
    $aReturn[$x][0] = $objItem.DeviceID
    $aReturn[$x][1] = $objItem.Name
    $aReturn[$x][2] = $objItem.Description
    $aReturn[$x][3] = $objItem.SocketDesignation
    $aReturn[$x][4] = $objItem.CurrentClockSpeed & ' MHz (max. ' & $objItem.MaxClockSpeed & ' MHz)'
    $aReturn[$x][5] = $objItem.ExtClock & ' MHz'
    $aReturn[$x][6] = Round($objItem.CurrentVoltage / 10, 1) & ' V'
    $aReturn[$x][7] = $objItem.AddressWidth & ' Bit'
    $aReturn[$x][8] = $objItem.DataWidth & ' Bit'
    $aReturn[$x][9] = $objItem.ProcessorId
    Switch @OSVersion
    Case 'WIN_VISTA', 'WIN_7'
    $aReturn[0][10] = 'Prozessorkerne:'
    $aReturn[0][11] = 'logische Prozessoren:'
    $aReturn[$x][10] = $objItem.NumberOfCores
    $aReturn[$x][11] = $objItem.NumberOfLogicalProcessors
    EndSwitch
    Next
    EndIf
    Return $aReturn
    EndFunc ;==>_CI_GetCPU

    [/autoit] [autoit][/autoit] [autoit]

    Func _CI_GetRAM($strComputer = '.')
    Local $aMemType[22] = ['Unbekannt', 'Anderes', 'DRAM', 'Sync DRAM', 'Cache DRAM', _
    'EDO', 'EDRAM', 'VRAM', 'SRAM', 'RAM', 'ROM', _
    'Flash', 'EEPROM', 'FEPROM', 'EPROM', 'CDRAM', '3DRAM', _
    'SDRAM', 'SGRAM', 'RDRAM', 'DDR', 'DDR-2']
    Local $aFormFactor[24] = ['Unbekannt', 'Andere', 'SIP', 'DIP', 'ZIP', 'SOJ', _
    'Proprietär', 'SIMM', 'DIMM', 'TSOP', 'PGA', 'RIMM', _
    'SODIMM', 'SRIMM', 'SMD', 'SSMP', 'QFP', 'TQFP', _
    'SOIC', 'LCC', 'PLCC', 'BGA', 'FPBGA', 'LGA']
    Local $aErrCorr[8] = ['Reserviert', 'Andere', 'Unbekannt', 'Keine', 'Parity', 'Single-bit ECC', 'Multi-bit ECC', 'CRC']
    Local $aReturn[2][8] = [[ _
    'Belegung:', 'Kapazität:', 'Daten-Bitbreite:', 'Steckplatz:', _
    'Typ:', 'Format:', 'Fehlerkorrektur:', 'Bezeichnung:']]
    Local $x = 0, $objWMIService, $colItems, $iMemDev, $iMaxCap, $iErrCorr
    $objWMIService = ObjGet('winmgmts:\\' & $strComputer & '\root\cimv2')
    If Not IsObj($objWMIService) Then Return SetError(1, 0, 0)
    $colItems = $objWMIService.ExecQuery('SELECT * FROM Win32_PhysicalMemoryArray', 'WQL', 0x30)
    If IsObj($colItems) Then
    For $objItem In $colItems
    $iMemDev = $objItem.MemoryDevices
    $iMaxCap = _ByteAutoSize($objItem.MaxCapacity * 1024, 0, 3)
    $iErrCorr = Number($objItem.MemoryErrorCorrection)
    Next
    EndIf
    $colItems = $objWMIService.ExecQuery('SELECT * FROM Win32_PhysicalMemory', 'WQL', 0x30)
    If IsObj($colItems) Then
    For $objItem In $colItems
    $x += 1
    ReDim $aReturn[$x + 1][8]
    $aReturn[$x][0] = $objItem.BankLabel
    $aReturn[$x][1] = _ByteAutoSize($objItem.Capacity, 0, 3) & ' (max. ' & $iMaxCap & ')'
    $aReturn[$x][2] = $objItem.TotalWidth & ' Bit'
    $aReturn[$x][3] = $objItem.DeviceLocator & ' (max. ' & $iMemDev & ' Steckplätze)'
    $aReturn[$x][4] = $aMemType[Number($objItem.MemoryType)]
    $aReturn[$x][5] = $aFormFactor[Number($objItem.FormFactor)]
    $aReturn[$x][6] = $aErrCorr[$iErrCorr]
    $aReturn[$x][7] = $objItem.PartNumber
    Next
    EndIf
    Return $aReturn
    EndFunc ;==>_CI_GetRAM

    [/autoit] [autoit][/autoit] [autoit]

    ;===============================================================================
    ; Function Name: _ByteAutoSize($iSize[, $iRound][, $iFormat][, $bThousands])
    ; Description:: Gibt einen Bytewert in einer bestimmten Einheit zurück
    ; Parameter(s): $iSize = Größe in Byte übergeben
    ; $iRound = Anzahl der Nachkommastellen (0...8)
    ; $iFormat = bestimmt den Rückgabewert
    ; 0 = Automatisch (je nach übergebenen Wert)
    ; 1 = in Byte
    ; 2 = in KByte
    ; 3 = in MByte
    ; 4 = in GByte
    ; $bThousands = Rückgabe mit Tausendertrennzeichen (True/False)
    ; Requirement(s): #include <String.au3>
    ; Author(s): Oscar (http://www.autoit.de)
    ;===============================================================================
    Func _ByteAutoSize($iSize, $iRound = 2, $iFormat = 0, $bThousands = True)
    Local $aSize[4] = [' Byte', ' KByte', ' MByte', ' GByte'], $sReturn
    If $iFormat < 0 Or $iFormat > 4 Then $iFormat = 0
    If $iRound < 0 Or $iRound > 8 Then $iRound = 2
    If Not IsBool($bThousands) Then $bThousands = False
    $iSize = Abs($iSize)
    If $iFormat = 0 Then
    For $i = 30 To 0 Step -10
    If $iSize > (2 ^ $i) Then
    $iFormat = $i / 10 + 1
    ExitLoop
    EndIf
    Next
    EndIf
    If $iFormat = 0 Then $iFormat = 1
    $sReturn = StringFormat('%.' & $iRound & 'f', Round($iSize / (2 ^ (($iFormat - 1) * 10)), $iRound))
    If $bThousands Then $sReturn = _StringAddThousandsSep($sReturn, '.', ',')
    Return $sReturn & $aSize[$iFormat - 1]
    EndFunc ;==>_ByteAutoSize

    [/autoit] [autoit][/autoit] [autoit]

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _StringAddThousandsSep
    ; Description ...: Returns the original numbered string with the Thousands delimiter inserted.
    ; Syntax.........: _StringAddThousandsSep($sString[, $sThousands = -1[, $sDecimal = -1]])
    ; Parameters ....: $sString - The string to be converted.
    ; $sThousands - Optional: The Thousands delimiter
    ; $sDecimal - Optional: The decimal delimiter
    ; Return values .: Success - The string with Thousands delimiter added.
    ; Author ........: SmOke_N (orignal _StringAddComma
    ; Modified.......: Valik (complete re-write, new function name)
    ; ===============================================================================================================================
    Func _StringAddThousandsSep($sString, $sThousands = -1, $sDecimal = -1)
    Local $sResult = "" ; Force string
    Local $rKey = "HKCU\Control Panel\International"
    If $sDecimal = -1 Then $sDecimal = RegRead($rKey, "sDecimal")
    If $sThousands = -1 Then $sThousands = RegRead($rKey, "sThousand")
    Local $aNumber = StringRegExp($sString, "(\D?\d+)\D?(\d*)", 1) ; This one works for negatives.
    If UBound($aNumber) = 2 Then
    Local $sLeft = $aNumber[0]
    While StringLen($sLeft)
    $sResult = $sThousands & StringRight($sLeft, 3) & $sResult
    $sLeft = StringTrimRight($sLeft, 3)
    WEnd
    $sResult = StringTrimLeft($sResult, StringLen($sThousands)) ; Strip leading thousands separator
    If $aNumber[1] <> "" Then $sResult &= $sDecimal & $aNumber[1]
    EndIf
    Return $sResult
    EndFunc ;==>_StringAddThousandsSep

    [/autoit]