Sign in to follow this  
Followers 0
Morpheus

How to get infos like CPU clock frequency etc. ?

6 posts in this topic

#1 ·  Posted (edited)

Hi friends,

I'd like to ask you how to get infos like CPU clock frequency etc. ?

I know there is a way how to get just some system infos but I didn't find how to get the above detail, like in the CPU-z program (http://www.cpuid.com), it's freeware and you get various hw details...

Can anyone help pls ?

Thanks in advance.

M.

Edited by Morpheus

Share this post


Link to post
Share on other sites



with WMI and COM Objects you can obtain what you want. Somewhere in this forum there is a programm called script repository which give example.

Try a search on the world WMI or Script.repository and you will find

Share this post


Link to post
Share on other sites

with WMI and COM Objects you can obtain what you want. Somewhere in this forum there is a programm called script repository which give example.

Try a search on the world WMI or Script.repository and you will find

Hi,

I've been seeking but haven't found. If you'd find it, pls let me know here...

Thanks in advance.

M.

Share this post


Link to post
Share on other sites

Hi,

I've been seeking but haven't found. If you'd find it, pls let me know here...

Thanks in advance.

M.

Look what I found when I went searching.

$wbemFlagReturnImmediately = 0x10
$wbemFlagForwardOnly = 0x20
$colItems = ""
$strComputer = "localhost"

$Output=""
$Output = $Output & "Computer: " & $strComputer & @CRLF
$Output = $Output & "==========================================" & @CRLF
$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_Processor", "WQL", _
$wbemFlagReturnImmediately + $wbemFlagForwardOnly)

If IsObj($colItems) then
For $objItem In $colItems
$Output = $Output & "AddressWidth: " & $objItem.AddressWidth & @CRLF
$Output = $Output & "Architecture: " & $objItem.Architecture & @CRLF
$Output = $Output & "Availability: " & $objItem.Availability & @CRLF
$Output = $Output & "Caption: " & $objItem.Caption & @CRLF
$Output = $Output & "ConfigManagerErrorCode: " & $objItem.ConfigManagerErrorCode & @CRLF
$Output = $Output & "ConfigManagerUserConfig: " & $objItem.ConfigManagerUserConfig & @CRLF
$Output = $Output & "CpuStatus: " & $objItem.CpuStatus & @CRLF
$Output = $Output & "CreationClassName: " & $objItem.CreationClassName & @CRLF
$Output = $Output & "CurrentClockSpeed: " & $objItem.CurrentClockSpeed & @CRLF
$Output = $Output & "CurrentVoltage: " & $objItem.CurrentVoltage & @CRLF
$Output = $Output & "DataWidth: " & $objItem.DataWidth & @CRLF
$Output = $Output & "Description: " & $objItem.Description & @CRLF
$Output = $Output & "DeviceID: " & $objItem.DeviceID & @CRLF
$Output = $Output & "ErrorCleared: " & $objItem.ErrorCleared & @CRLF
$Output = $Output & "ErrorDescription: " & $objItem.ErrorDescription & @CRLF
$Output = $Output & "ExtClock: " & $objItem.ExtClock & @CRLF
$Output = $Output & "Family: " & $objItem.Family & @CRLF
$Output = $Output & "InstallDate: " & WMIDateStringToDate($objItem.InstallDate) & @CRLF
$Output = $Output & "L2CacheSize: " & $objItem.L2CacheSize & @CRLF
$Output = $Output & "L2CacheSpeed: " & $objItem.L2CacheSpeed & @CRLF
$Output = $Output & "LastErrorCode: " & $objItem.LastErrorCode & @CRLF
$Output = $Output & "Level: " & $objItem.Level & @CRLF
$Output = $Output & "LoadPercentage: " & $objItem.LoadPercentage & @CRLF
$Output = $Output & "Manufacturer: " & $objItem.Manufacturer & @CRLF
$Output = $Output & "MaxClockSpeed: " & $objItem.MaxClockSpeed & @CRLF
$Output = $Output & "Name: " & $objItem.Name & @CRLF
$Output = $Output & "OtherFamilyDescription: " & $objItem.OtherFamilyDescription & @CRLF
$Output = $Output & "PNPDeviceID: " & $objItem.PNPDeviceID & @CRLF
$strPowerManagementCapabilities = $objItem.PowerManagementCapabilities(0)
$Output = $Output & "PowerManagementCapabilities: " & $strPowerManagementCapabilities & @CRLF
$Output = $Output & "PowerManagementSupported: " & $objItem.PowerManagementSupported & @CRLF
$Output = $Output & "ProcessorId: " & $objItem.ProcessorId & @CRLF
$Output = $Output & "ProcessorType: " & $objItem.ProcessorType & @CRLF
$Output = $Output & "Revision: " & $objItem.Revision & @CRLF
$Output = $Output & "Role: " & $objItem.Role & @CRLF
$Output = $Output & "SocketDesignation: " & $objItem.SocketDesignation & @CRLF
$Output = $Output & "Status: " & $objItem.Status & @CRLF
$Output = $Output & "StatusInfo: " & $objItem.StatusInfo & @CRLF
$Output = $Output & "Stepping: " & $objItem.Stepping & @CRLF
$Output = $Output & "SystemCreationClassName: " & $objItem.SystemCreationClassName & @CRLF
$Output = $Output & "SystemName: " & $objItem.SystemName & @CRLF
$Output = $Output & "UniqueId: " & $objItem.UniqueId & @CRLF
$Output = $Output & "UpgradeMethod: " & $objItem.UpgradeMethod & @CRLF
$Output = $Output & "Version: " & $objItem.Version & @CRLF
$Output = $Output & "VoltageCaps: " & $objItem.VoltageCaps & @CRLF
if Msgbox(1,"WMI Output",$Output) = 2 then ExitLoop
$Output=""
Next
Else
Msgbox(0,"WMI Output","No WMI Objects Found for class: " & "Win32_Processor" )
Endif


Func WMIDateStringToDate($dtmDate)

Return (StringMid($dtmDate, 5, 2) & "/" & _
StringMid($dtmDate, 7, 2) & "/" & StringLeft($dtmDate, 4) _
& " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate,13, 2))
EndFunc


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Hi,

ive typed COM and WMI keywords and didn't find a lot...

However thanks a lot I'm gonna check it out... ;-)

Have a nice day !

M.

Edited by Morpheus

Share this post


Link to post
Share on other sites

Hi,

ive typed COM and WMI keywords and didn't find a lot...

However thanks a lot I'm gonna check it out... ;-)

Have a nice day !

M.

I forgot to state in my last post.

This belongs in the support forum, not here.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0