找回密码
 加入
搜索
查看: 2106|回复: 3

求救

[复制链接]
发表于 2008-11-11 08:27:54 | 显示全部楼层 |阅读模式
请问怎么智能判断CPU是不是双核
如果是双核就安装补丁 怎么做到?
发表于 2008-11-11 10:50:06 | 显示全部楼层
呵呵,任务管理器的性能页那有两个CPU的就是双核了
发表于 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[0] <> 2 Then
 MsgBox(64, "友情提示", "非双核CPU,无需安装双核补丁!", 4)
 Exit
EndIf
If $cputype[0] = "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更强大!!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-7-3 08:56 , Processed in 0.074444 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表