本帖最后由 都市浪子666 于 2010-12-14 14:48 编辑
MsgBox(4096, "注意!", "程序安装过程中,请不要有任何键鼠操作!", 3)
blockinput (1)
Run("setup.exe")
WinWaitActive("设定向导","欢迎使用NOD32设定程序")
ControlClick("设定向导","欢迎使用NOD32设定程序","[class:Button;ID:12324]")
WinWaitActive("最终用户软件使用协议","我同意")
ControlClick("最终用户软件使用协议","我同意","[class:Button;ID:1011]")
ControlClick("最终用户软件使用协议","我同意","[class:Button;ID:12324]")
WinWaitActive("自动更新设定","以后再设定更新参数")
ControlClick("自动更新设定","以后再设定更新参数","[class:Button;ID:3053]")
ControlClick("自动更新设定","以后再设定更新参数","[class:Button;ID:12324]")
WinWaitActive("ThreatSense.Net","预警系统")
ControlClick("ThreatSense.Net","预警系统","[class:Button;ID:12324]")
WinWaitActive("不受欢迎软件侦测","启动不受欢迎软件侦测")
ControlClick("不受欢迎软件侦测","启动不受欢迎软件侦测","[class:Button;ID:1025]")
ControlClick("不受欢迎软件侦测","启动不受欢迎软件侦测","[class:Button;ID:12324]")
WinWaitActive("文件实时监控AMON","我希望自动加载文件实时监控")
ControlClick("文件实时监控AMON","我希望自动加载文件实时监控","[class:Button;ID:12324]")
; 一直循环,直到存在("安装参数全部设定完毕","安装参数全部设定完毕") 这个窗口 才跳出循环
;在循环期间如有 ("网络监视","侦测来自互联网的入侵")这个窗口 则执行相应的操作
Do
Sleep(10)
if WinExists("网络监视","侦测来自互联网的入侵") then
ControlClick("网络监视","侦测来自互联网的入侵","[class:Button;ID:1000]")
ControlClick("网络监视","侦测来自互联网的入侵","[class:Button;ID:12324]")
EndIf
Until WinExists("安装参数全部设定完毕","安装参数全部设定完毕") =True
WinWaitActive("安装参数全部设定完毕","安装参数全部设定完毕")
ControlClick("安装参数全部设定完毕","安装参数全部设定完毕","[class:Button;ID:12324]")
WinWaitActive("安装完成","需要重新启动")
ControlClick("安装完成","需要重新启动","[class:Button;ID:1011]")
ControlClick("安装完成","需要重新启动","[class:Button;ID:12325]")
FileDelete (@StartMenuCommonDir&"\程序\Eset\自述文件.lnk")
FileDelete (@StartMenuCommonDir&"\程序\Eset\卸载.lnk")
FileDelete (@StartMenuCommonDir&"\程序\Eset\帮助.lnk")
exit
|