AM电脑吧 - Win10精简版系统_Win11精简版_Win7旗舰版

Yes
查看: 7040|回复: 7
收起左侧

[其它] 检测电脑型号,AU3源码

[复制链接]
ampc8193

签到天数: 816 天

[LV.10]无所不能

id yinbinly 发表于 2011-05-20 20:11:17
本帖最后由 yinbinly 于 2011-5-20 20:12 编辑
  1. #RequireAdmin
  2. #Region ;**** 参数创建于 ACNWrapper_GUI ****
  3. #AutoIt3Wrapper_icon=工具.ico
  4. #AutoIt3Wrapper_outfile=电脑品牌检测.exe
  5. #AutoIt3Wrapper_Res_Comment=制作:yinbinly
  6. #AutoIt3Wrapper_Res_Description=电脑主板品牌检测
  7. #AutoIt3Wrapper_Res_LegalCopyright=版权所有 (C) 2011
  8. #EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
  9. #Region AutoIt3Wrapper 预编译参数(常用参数)

  10. #EndRegion AutoIt3Wrapper 预编译参数设置完成
  11. ;不显示托盘图标
  12. #NoTrayIcon
  13. ;防止程序重复运行
  14. $g_szVersion = "test"
  15. If WinExists($g_szVersion) Then Exit
  16. AutoItWinSetTitle($g_szVersion)
  17. Global $info
  18. $strComputer = "."
  19. $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\" & $strComputer & "\root\cimv2")

  20. $xh = ''
  21. $colChassis = $objWMIService.ExecQuery ("Select * from Win32_SystemEnclosure")
  22. For $objChassis In $colChassis
  23.         For $objItem In $objChassis.ChassisTypes
  24.                 Switch $objItem
  25.                         Case 1
  26.                                 $xh = "Other"
  27.                         Case 2
  28.                                 $xh = "Unknown"
  29.                         Case 3
  30.                                 $xh = "台式机";"Desktop"
  31.                         Case 4
  32.                                 $xh = "Low Profile Desktop"
  33.                         Case 5
  34.                                 $xh = "Pizza Box"
  35.                         Case 6
  36.                                 $xh = "Mini Tower"
  37.                         Case 7
  38.                                 $xh = "Tower"
  39.                         Case 8
  40.                                 $xh = "Portable"
  41.                         Case 9
  42.                                 $xh = "Laptop"
  43.                         Case 10
  44.                                 $xh = "笔记本";"Notebook"
  45.                         Case 11
  46.                                 $xh = "Handheld"
  47.                         Case 12
  48.                                 $xh = "Docking Station"
  49.                         Case 13
  50.                                 $xh = "All-in-One"
  51.                         Case 14
  52.                                 $xh = "Sub-Notebook"
  53.                         Case 15
  54.                                 $xh = "Space Saving"
  55.                         Case 16
  56.                                 $xh = "Lunch Box"
  57.                         Case 17
  58.                                 $xh = "Main System Chassis"
  59.                         Case 18
  60.                                 $xh = "Expansion Chassis"
  61.                         Case 19
  62.                                 $xh = "Sub-Chassis"
  63.                         Case 20
  64.                                 $xh = "Bus Expansion Chassis"
  65.                         Case 21
  66.                                 $xh = "Peripheral Chassis"
  67.                         Case 22
  68.                                 $xh = "Storage Chassis"
  69.                         Case 23
  70.                                 $xh = "Rack Mount Chassis"
  71.                         Case 24
  72.                                 $xh = "Sealed-Case PC"
  73.                         Case Else
  74.                                 $xh = "Unknown"
  75.                 EndSwitch
  76. ;                MsgBox(0, 0, "Chassis Type: " & $xh)
  77.         Next
  78. Next
  79. $info&="计算机类型:"&$xh&@CRLF
  80. $mb=''
  81. $colBoard = $objWMIService.ExecQuery("SELECT * FROM Win32_BaseBoard")
  82. For $object In $colBoard
  83.         $mb = $object.Product
  84. Next
  85. $info&="主板型号:"&$mb&@CRLF


  86. $computerModel = $objWMIService.ExecQuery("Select * from Win32_ComputerSystemProduct")

  87. For $objItem in $computerModel
  88.         $computerModel2 = $objItem.vendor & $objItem.name & "(" & $objItem.IdentifyingNumber & ")"
  89.         Next
  90. $info&="电脑型号:"&$computerModel2&@CRLF
  91.         $cpu2=''
  92. $cpu = $objWMIService.ExecQuery ("Select * from Win32_Processor")
  93. For $objItem in $cpu
  94.     $cpu2= $cpu2 & $objItem.Name & "  "
  95. Next
  96. $info&="处理器:" & $cpu2;
  97. MsgBox(0,'yinbinly提示:',$info)
复制代码
检测电脑的类型,主板型号,电脑型号(品牌机,或笔记本)CPU型号本人的电脑 pp.jpg

评分

参与人数 1带宽 +5 收起 理由
ampc81 + 5 原创内容

本文地址: https://www.ampc8.com/thread-704-1-1.html
上一篇:4.8GHz!全球最快的笔记本登场
下一篇:微软拯救WP7须做10件事:推自主品牌智能手机
回复

举报

ampc839210

签到天数: 271 天

[LV.8]八秒开机

id trhy1234567 发表于 2016-10-28 19:31:36
支持,谢谢!
回复

举报

ampc837848

签到: Lazy

id 1834782466 发表于 2016-02-20 04:19:46
本帖最后由 1834782466 于 2016/2/20 04:21 编辑

谢谢分享 学习了。

回复

举报

ampc8320

签到天数: 3 天

[LV.2]二兆带宽

id fzz888 发表于 2011-06-03 01:06:42
挺好玩的一个程序
回复

举报

ampc8193

签到天数: 816 天

[LV.10]无所不能

lz  楼主| yinbinly 发表于 2011-05-23 11:24:27
未命名.jpg 品牌机还可以读出出厂编号来,厂家是比较精明的
回复

举报

ampc8471

签到天数: 21 天

[LV.4]四枚内存条

id ahzsm 发表于 2011-05-22 19:17:15
检测试试看看撒,谢谢分享
回复

举报

ampc853

签到天数: 918 天

[LV.10]无所不能

id 永远的菜鸟 发表于 2011-05-21 07:19:02
这个可以试下。
回复

举报

ampc81

签到天数: 644 天

[LV.9]九级电脑高手

id 发表于 2011-05-20 20:14:25
呵呵,有意思。

2011-05-20_201437.jpg
回复

举报

您需要登录后才可以回帖 登录 | 验证注册

Powered by AMpc8.Com (晋ICP备13003365号ghs 晋公网安备 14090202000112号 |GMT+8, 2024/4/26 18:48 |
快速回复 返回顶部 返回列表