系统漏洞补丁Ver3
#include<ie.au3>
Opt('Wintitlematchmode',2)
$YahooSafe=_IECreate('http://cn.zs.yahoo.com/safe08.htm')
$Ls=_IELinkGetCollection($YahooSafe)
for $L in $Ls
if StringInStr($L.href,'http://download.microsoft.com/download')>0 then
;ConsoleWrite($L.href [email=&@crlf]&@crlf[/email] )
runSp($L)
endif
next
Func runSp($d)
$sz=InetGetSize($L.href)
$packName=StringRegExpReplace($L.href,'\S+/','')
[email=$packFullName=@TempDir&]$packFullName=@TempDir&'\'&$packName[/email]
InetGet($d.href,$packFullName,0,1)
While @InetGetActive
;TrayTip("Downloading", "Bytes = " & , 10, 16)
$d.innertext='下载进度:[email=]'&@InetGetBytesRead&'/'&$sz&'B'[/email]
Sleep(1000)
Wend
$d.href=''
$d.innertext='安装中...'
Run($packFullName)
While ProcessExists($packName)
Sleep(1000)
if WinActive('Setup Error','') then
WinActivate('Setup Error','')
WinWaitActive('Setup Error','')
$d.innertext='安装失败'
$d.title=WinGetText('Setup Error')
send('{enter}')
elseif WinActive('安装程序错误','') then
WinActivate('安装程序错误','')
WinWaitActive('安装程序错误','')
$d.innertext='安装失败!!!'
$d.title=WinGetText('安装程序错误')
send('{enter}')
ElseIf WinActive("安装向导","") Then
WinActivate("安装向导","")
WinWaitActive("安装向导","")
Send("{ALTDOWN}n{ALTUP}{ALTDOWN}a{ALTUP}{ALTDOWN}n{ALTUP}")
WinWaitActive("安装向导","您已成功完成")
Send("!d{enter}")
$d.innertext='OK'
ElseIf WinActive("Software Update Installation Wizard","") Then
WinActivate("Software Update Installation Wizard","")
WinWaitActive("Software Update Installation Wizard","")
Send("{ALTDOWN}n{ALTUP}{ALTDOWN}a{ALTUP}{ALTDOWN}n{ALTUP}!n")
WinWaitActive("Software Update Installation Wizard","") ;???
Send("!d{enter}")
$d.innertext='OK'
Else
endif
WEnd
if $d.innertext='OK' then FileDelete($packFullName)
EndFunc