#27584 - 2002-08-22 11:55 PM
Re: Remotely generate @cpu output?
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Getting some inconsitent results with regard to the type of processor (family)..
Ref. - WMIQuery() - Used to execute a query against WMI
Results are: quote:
System Manufacturer is = Compaq System Model is = EVO System Serial Number is = xxxxxxxxxxxx System BIOS Version is = 686Y2 v2.06 System BIOS Date is = COMPAQ - 20011203 CPU Speed is = 1695 Mhz 2 Family is 8086 System Memory = 255 MB Dimm Size = 0 MB Dimm Size = 128 MB Dimm Size = 128 MB Video Card is = NVIDIA Vanta/Vanta LT Video Res is = 1024 x 768 x 65536 colors Modem is = Network Card is = Intel(R) PRO/100 VM Network Connection
Code is:
code:
BREAK ON CLS ? "System Manufacturer is = "WMIQuery("Manufacturer","Win32_ComputerSystem") ? "System Model is = "WMIQuery("Model","Win32_ComputerSystem") ? "System Serial Number is = "WMIQuery("SerialNumber","Win32_BIOS") ? "System BIOS Version is = "WMIQuery("SMBIOSBIOSVersion","Win32_BIOS") ? "System BIOS Date is = "WMIQuery("Version","Win32_BIOS") ? "CPU Speed is = "WMIQuery("CurrentClockSpeed","Win32_Processor") " Mhz" ; http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_processor.asp $Family = WMIQuery("Family","Win32_Processor") ?$Family get $k Select CASE $Family = 0 $Family = "Other" CASE $Family = 1 $Family = "Unknown" CASE $Family = 2 $Family = "8086" CASE $Family = 3 $Family = "80286" CASE $Family = 4 $Family = "80386" CASE $Family = 5 $Family = "80486" CASE $Family = 6 $Family = "8087" CASE $Family = 7 $Family = "80287" CASE $Family = 8 $Family = "80387" CASE $Family = 9 $Family = "80487" CASE $Family = 10 $Family = "Pentium Family" CASE $Family = 11 $Family = "Pentium Pro" CASE $Family = 12 $Family = "Pentium II" CASE $Family = 13 $Family = "Pentium MMX" CASE $Family = 14 $Family = "Celeron" CASE $Family = 15 $Family = "Pentium II Xeon" CASE $Family = 16 $Family = "Pentium III" CASE $Family = 17 $Family = "M1 Family" CASE $Family = 18 $Family = "M2 Family" CASE $Family = 19 $Family = "K5 Family" CASE $Family = 20 $Family = "K6 Family" CASE $Family = 21 $Family = "K6-2" CASE $Family = 22 $Family = "K6-III" CASE $Family = 23 $Family = "Athlon" CASE $Family = 24 $Family = "Power PC Family" CASE $Family = 25 $Family = "Power PC 601" CASE $Family = 26 $Family = "Power PC 603" CASE $Family = 27 $Family = "Power PC 603+" CASE $Family = 28 $Family = "Power PC 604" CASE $Family = 29 $Family = "Alpha Family" CASE $Family = 30 $Family = "MIPS Family" CASE $Family = 31 $Family = "SPARC Family" CASE $Family = 32 $Family = "68040" CASE $Family = 33 $Family = "68xxx Family" CASE $Family = 34 $Family = "68000" CASE $Family = 35 $Family = "68010" CASE $Family = 36 $Family = "68020" CASE $Family = 37 $Family = "68030" CASE $Family = 38 $Family = "Hobbit Family" CASE $Family = 39 $Family = "Weitek" CASE $Family = 40 $Family = "PA-RISC Family" CASE $Family = 41 $Family = "V30 Family" CASE $Family = 42 $Family = "Pentium III Xeon" CASE $Family = 43 $Family = "AS400 Family" CASE $Family = 44 $Family = "IBM390 Family" CASE $Family = 45 $Family = "i860" CASE $Family = 46 $Family = "i960" CASE $Family = 47 $Family = "SH-3" CASE $Family = 48 $Family = "SH-4" CASE $Family = 49 $Family = "ARM" CASE $Family = 50 $Family = "StrongARM" CASE $Family = 51 $Family = "6x86" CASE $Family = 52 $Family = "MediaGX" CASE $Family = 53 $Family = "MII" CASE $Family = 54 $Family = "WinChip" ENDSELECT ? "Family is " +$Family ;? "Family is = "WMIQuery("Family","Win32_Processor") " Family" ? "System Memory = "val(WMIQuery("TotalPhysicalMemory","Win32_LogicalMemoryConfiguration"))/1024 " MB" for each $dimm in Split(WMIQuery("Capacity","Win32_PhysicalMemory"),"|") ? "Dimm Size = "val($dimm) / 1048576 " MB" next ? "Video Card is = "WMIQuery("Description","Win32_VideoController") ? "Video Res is = "WMIQuery("VideoModeDescription","Win32_VideoController") ? "Modem is = "WMIQuery("Description","Win32_POTSModem") for each $nic in Split(WMIQuery("ProductName","Win32_NetworkAdapter"),"|") if instr($nic,"miniport")=0 and instr($nic,"RAS")=0 and instr($nic,"Parallel")=0 ? "Network Card is = "$nic endif next
get $k
FUNCTION WMIQuery($what,$where,) dim $strQuery, $objEnumerator, $value $strQuery = "Select $what From $where" $SystemSet = GetObject("winmgmts:{impersonationLevel=impersonate}!//@WKSTA") $objEnumerator = $SystemSet.ExecQuery($strQuery) For Each $objInstance in $objEnumerator If @Error = 0 and $objInstance <> "" $=execute("$$value = $$objInstance.$what") $WMIQuery="$value"+"|"+"$WMIQuery" EndIf Next $WMIQuery=left($WMIQuery,len($WMIQuery)-1) exit @error ENDFUNCTION
Kent
|
|
Top
|
|
|
|
#27586 - 2002-08-23 02:53 AM
Re: Remotely generate @cpu output?
|
Jtel
Fresh Scripter
Registered: 2002-04-13
Posts: 41
|
I wouldn't rely on any of the information in the CPU family table. Based on what you're saying and what the table shows, my new 2Ghz Pentium 4 (family 15) would be a Celeron. The chart would be nice if it were correct and up to date.
|
|
Top
|
|
|
|
#27587 - 2002-08-23 03:43 AM
Re: Remotely generate @cpu output?
|
Sealeopard
KiX Master
   
Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
|
Yeah, I found some documentation of this 'bug' here: http://groups.google.com/groups?hl=en&lr=&ie=UTF -8&oe=UTF-8&th=cdbecd9d8be76a9f&seekm=eptdpf4MCHA.2404%40tkmsftngp11&frame=off
This is actually quiet interesting since it specifies a way to access the value map of the returned value. you can therefore translate the value into the associated value, in this case the processor type.
Another addition: This post ( http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=3D390CDB.5C985D 0E%40hydro.com ) contains a translation table for family codes and model numbers, pretty extensive.
And I found a Microsoft KB article, too: http://support.microsoft.com/default.aspx?scid=kb;en-us;q289514
Jackput! The official Intel type, family, model, and stepping numbers are in this PDf document: ftp://download.intel.com/support/processors/procid/24161812.pdf [ 23. August 2002, 03:56: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 484 anonymous users online.
|
|
|