最新消息:

cpudesc为NSIS提供获取cpu信息的插件

nsis 永恒心锁 1609浏览 0评论
/*
cpudesc为NSIS提供获取cpu信息的插件
ITELP: Values range [0..4].
 0: Not a genuine Intel CPU (or a very, VERY old one).
 1: Pentium or Pentium with MMX.
 (Check the MMX field if you want to know about the CPU's MMX support.)
 2: Pentium Pro, II or Celeron.
 (May or may not have MMX - PPros don't, the others do. Check the MMX field.)
 3: Pentium III or P3 (old) Xeon. (Always has MMX and SSE.)
 4: Pentium IV or (new) Xeon. (Always has MMX, SSE and SSE2.)
AMD: A bit more complicated...
 000: Not an authentic AMD CPU (or a very, VERY old one).
 Kdd: An old K-series. "dd" is either 05 for a K5 or 06 for a K6.
 (Pentium compatible. K5s have no MMX or 3DNOW. K6s have standard MMX,
 and later models have basic 3DNOW.)
 Add: An Athlon or a Duron. "dd" is the model number (goes from 01 to 10).
 (Pentium II compatible. All of these have extended MMX and extended 3DNOW.
 None have any SSE.)
 Odd: An Opteron. "dd" gives the model number.
 (Pentium IV compatible. This CPU's got everything, it seems.)
PPRO: Values range [0..1].
 0: Not compatible with the Intel Pentium Pro processor.
 1: Compatible with the Intel Pentium Pro processor.
MMX: Values range [0..2].
 0: No MMX support.
 1: Standard Intel MMX support.
 2: Standard MMX support plus AMD MMX extensions.
SSE: Values range [0..1].
 0: No SSE support.
 1: Supports SSE (Intel's Streaming SIMD extensions, P3-style).
SSE2: Values range [0..1].
 0: No SSE2 support.
 1: Supports SSE2 (Intel's Streaming SIMD extensions 2, P4-style).
3DNOW: Values range [0..2].
 0: No 3DNOW support.
 1: Standard AMD 3DNOW support.
 2: Standard AMD 3DNOW support plus AMD 3DNOW extensions.
ARCH: Values range [00..10].
 00: 32-bit Intel or compatible
 01: MIPS (did NT 3.5, apparently)
 02: DEC Alpha. (Yes, DEC. I can't bring myself to call it COMPAQ.)
 03: PowerPC
 04: SHX (?)
 05: ARM (Acorn Risc Machine, I presume. Running Windows?)
 06: 64-bit Intel.
 07: 64-bit Alpha
 08: MSIL (?)
 09: 64-bit AMD
 10: 32-bit Intel doing Win64 (?)
LEVEL: "Processor level", like what you see in the main processor environment
 variable. Sort-of useless for Intel architecture.
NCPU: The number of processors available. (Affected by that "Hyper" business
 that the new XEONs can do, I think.)
MHZ: The CPU's internal clock speed in MHz (Approx).
RAM: The amount of RAM (physical memory) in megabytes (rounded).
*/
!AddPlugindir "."
OutFile "cpudesc.exe"
Section ""
 cpudesc::tell
 Pop $0 ;full identification string in $0
 MessageBox MB_OK "$0"
 StrCpy $1 $0 4 90 ;pull out four characters after RAM=
 IntOp $1 1$1 - 10000 ;ignore any leading zeros, the number is not octal
 MessageBox MB_OK "Ram (megs): '$1'"
 StrCpy $2 $0 5 80 ;pull out five characters after MHZ=
 IntOp $2 1$2 - 100000 ;ignore any leading zeros, the number is not octal
 MessageBox MB_OK "CPU speed (MHz): '$2'"
SectionEnd
永恒心锁,版权所有丨如未注明,均为转载丨本网站采用BY-NC-SA协议进行授权

转载请注明:永恒心锁-分享互联网 » cpudesc为NSIS提供获取cpu信息的插件

您必须 登录 才能发表评论!