找回密码
 加入
搜索
楼主: newuser

[系统综合] 对补丁文件进行对比后批量下载的问题?

  [复制链接]
发表于 2010-9-7 11:58:21 | 显示全部楼层
相信有更好的方法可以对比补丁是否安装。。
 楼主| 发表于 2010-9-7 12:17:50 | 显示全部楼层
回复 15# nmgwddj
存在相同的HOTFIX注册表路径,苦恼啊!打上了不应该没有记忆啊?
 楼主| 发表于 2010-9-7 12:24:14 | 显示全部楼层
回复 16# nmgwddj
我开始采取先把所有补丁都下来,然后利用filetoarray 的办法把它写到1个ini文件中,再和注册表中的KB部分比较,这样做好象比我的问题效果要好些,至少有些补丁在打过之后再重新启动计算机就没有提示了,但如果在补丁文件很多的情况下这样做就太慢了,所以我想能不能直接在连接地址的KB部分做文章,因为他们的名字我是一点也没改过的,我把连接地址的KB提出来和注册表中的KB比较,相对就快多了,按道理它和 之前的道理一样啊,但为什么效果不一样呢?
阁下有更好的提示吗?
发表于 2010-9-9 14:51:54 | 显示全部楼层
本帖最后由 Duvet 于 2010-9-9 17:00 编辑


#Include <Array.au3>
Local $Url="http://10.64.240.23:801/patchs/10-060/NDP20SP1-KB983582-x86.exe|"& _
"http://10.64.240.23:801/patchs/10-060/NDP20SP2-KB983583-x86.exe|"& _
"http://10.64.240.23:801/patchs/10-022/WindowsServer2003-KB981349-x86-CHS.exe|"& _
"http://10.64.240.23:801/patchs/09-054/WindowsServer2003-KB974455-x86-CHS.exe|"& _
"http://10.64.240.23:801/patchs/09-053/WindowsServer2003-KB975254-x86-CHS.exe|"& _
"http://10.64.240.23:801/patchs/09-051/WindowsMedia9-KB969878-x86-CHS.exe|"& _
"http://10.64.240.23:801/patchs/09-044/WindowsServer2003-KB956744-x86-CHS.exe|"& _
"http://10.64.240.23:801/patchs/09-039/WindowsServer2003-KB969883-x86-CHS.exe|"& _
"http://10.64.240.23:801/patchs/09-034/WindowsServer2003-KB972260-x86-CHS.exe|"& _
"http://10.64.240.23:801/patchs/09-032/WindowsServer2003-KB973346-x86-CHS.exe|"& _
"http://10.64.240.23:801/patchs/09-025/WindowsServer2003-KB968537-x86-CHS.exe|"& _
"http://10.64.240.23:801/patchs/09-020/WindowsServer2003-KB970483-x86-CHS.exe|"& _
"http://10.64.240.23:801/patchs/09-019/WindowsServer2003-KB969897-x86-CHS.exe|"& _
"http://10.64.240.23:801/patchs/09-018/WindowsServer2003-KB970437-x86-CHS.exe|"& _
"http://10.64.240.23:801/patchs/09-014/WindowsServer2003-KB963027-x86-CHS.exe|"& _
"http://10.64.240.23:801/patchs/09-011/WindowsServer2003-KB961373-x86-CHS.exe|"& _
"http://10.64.240.23:801/patchs/09-006/WindowsServer2003-KB958690-x86-CHS.exe|"& _
"http://10.64.240.23:801/patchs/08-078/WindowsServer2003-KB960714-x86-CHS.exe|"& _
"http://10.64.240.23:801/patchs/08-052/WindowsServer2003-KB938464-v2-x86-CHS.exe|"& _
"http://10.64.240.23:801/patchs/08-001/WindowsServer2003-KB941644-x86-CHS.exe"
$Url=StringSplit($Url,"|",2)
_ArrayDisplay($url)

Local $i=0,$checkneedsetup
While 1
        $i+=1
        $Var=RegEnumKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix",$i)
        If @Error Then ExitLoop
        ;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
        ;If Not StringInStr($Var,"KB") Then
        ;        ContinueLoop
        ;ElseIf StringInStr(StringRight($Var,2),"v2") Then
        ;        $Var = StringTrimRight($Var,2)&"-v2-"
        ;EndIf
        $checkneedsetup=_ArraySearch($url,$Var,0,0,0,1)
        If Not @Error Then _ArrayDelete($url,$checkneedsetup)
WEnd

_ArrayDisplay($url)
Exit

评分

参与人数 2金钱 +40 收起 理由
newuser + 20 谢谢,我试一下
afan + 20

查看全部评分

发表于 2010-9-10 08:59:10 | 显示全部楼层
问题解决了吗?
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-21 22:40 , Processed in 0.068064 second(s), 15 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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