最新消息:

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

nsis 永恒心锁 2341浏览 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
免责声明:根据《计算机软件保护条例》第十七条规定“为了学习和研究软件内含的设计思想和原理,通过安装、显示、传输或者存储软件等方式使用软件的,可以不经软件著作权人许可,不向其支付报酬。”您需知晓本站所有内容资源均来源于网络,仅供用户交流学习与研究使用,版权归属原版权方所有,版权争议与本站无关,用户本人下载后不能用作商业或非法用途,需在24个小时之内从您的电脑中彻底删除上述内容,否则后果均由用户承担责任;如果您访问和下载此文件,表示您同意只将此文件用于参考、学习而非其他用途,否则一切后果请您自行承担,如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。丨本站为个人博客非盈利性站点,所有软件信息均来自网络,所有资源仅供学习参考研究目的,并不贩卖软件,不存在任何商业目的及用途。丨本文采用知识共享 署名4.0国际许可协议 [BY-NC-SA] 进行授权BY-NC-SA协议进行授权

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

发表我的评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址