|
|
|||||||
See: http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=198944 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 |
||||||||
|
|
|||||||
as a hater of wmi I would suggest everyone use registry instead. even kixtart should use it, not sure why ruud decided not to. Code: readvalue("HKLM\HARDWARE\DESCRIPTION\SYSTEM\CentralProcessor\0","ProcessorNameString") |
||||||||
|
|
|||||||
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 |