Below are two ways to get the CPU name. The kix macro returns incorrect data and the WMI query shows the correct name. Can @CPU be fixed to display the correct data? The two MS patches for Celeron and Core 2 duo processors do not seem to fix this issue.
I tried it on a Windows 7 system. WMI returns the correct data and @CPU returns Intel Pentium III instead of the actual name of the CPU.
Code:
Break on
? @CPU
$wmiColl = GetObject("WinMgmts:root/cimv2").ExecQuery("Select * FROM Win32_Processor ")
For Each $wmiObj in $wmiColl
? $wmiObj.Name
Next
Sleep 5
Quote:
Intel Pentium III Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz
Registered: 2005-01-17
Posts: 1894
Loc: Hilversum, The Netherlands
As a WMI lover, a bit faster code:
Code:
Dim $objCol, $objItem
$objCol = GetObject("WinMgmts:\\.\root\cimv2").ExecQuery("Select Name FROM Win32_Processor",,48)
For Each $objItem in $objCol
? $objItem.Name
Next