qwg192800 发表于 2008-11-11 08:27:54

求救

请问怎么智能判断CPU是不是双核
如果是双核就安装补丁 怎么做到?

liongodmien 发表于 2008-11-11 10:50:06

呵呵,任务管理器的性能页那有两个CPU的就是双核了

lynfr8 发表于 2009-7-22 01:33:00

http://www.autoitx.com/forum.php?mod=viewthread&tid=1735&page=1&fromuid=1003#pid11769
这里有一个WMI判断的方法
另外之前有个坛友给我一份:
;功能:自动判断操作系统版本为sp3时,打相应的补丁。自动判断sp3下cpu类型,如是AMD双核驱动,自动打上AMDCPU驱动和 AMD双核补丁1.14驱动。
#include "GUIConstants.au3"
Opt("WinTitleMatchMode", 2)
If @OSVersion = "Win_XP" And @OSServicePack = "Service Pack 3" Then
Dim $libhelperdll, $cpulog, $cputype
$libhelperdll = DllOpen(@ScriptDir & "\LibGhostHlper.dll")
$cpulog = DllCall($libhelperdll, "int", "Util_GetCpuLogCount")
$cputype = DllCall($libhelperdll, "int", "Util_GetCpuManu")
If $cpulog <> 2 Then
MsgBox(64, "友情提示", "非双核CPU,无需安装双核补丁!", 4)
Exit
EndIf
If $cputype = "1" Then
MsgBox(48, "友情提示", "AMD双核CPU,即将为您安装AMD驱动,请稍候", 4)
$PID1 = Run(@WindowsDir & "\temp\AmdDrv.exe")
ProcessWaitClose($PID1)
$PID2 = Run(@WindowsDir & "\temp\AmdDualCoreOpt.exe")
ProcessWaitClose($PID2)
RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Throttle")
RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Throttle", "PerfEnablePackageIdle", "REG_DWORD", "1")
Else
MsgBox(48, "友情提示", "Intel双核CPU,XP SP3下无需安装双核驱动", 4)
EndIf
Else
      MsgBox(0,0,"不是XP_sp3系统,程序将退出", 4)
Exit
EndIf


也不知论坛有无人发过,就放在这里吧

冰椰汁 发表于 2010-3-8 09:32:55

谢谢楼上兄弟,源码很强大,DLL更强大!!
页: [1]
查看完整版本: 求救