#RequireAdmin
Run("QQ2012.exe")
WinWait("腾讯QQ2012 安装向导","")
If WinExists("腾讯QQ2012 安装向导","检测到QQ正在运行") Then
ControlClick("腾讯QQ2012 安装向导","检测到QQ正在运行","Button2")
EndIf
WinWait("腾讯QQ2012 安装向导","我已阅读并同意软件许可协议和青少年上网安全指引")
if 0 = ControlCommand("腾讯QQ2012 安装向导","在安装软件前, 请仔细阅读下面的软件许可协议和青少年上网安全指引。","Button1","IsChecked") Then
ControlClick("腾讯QQ2012 安装向导","在安装软件前, 请仔细阅读下面的软件许可协议和青少年上网安全指引。","Button1")
EndIf
Do
$wer = ControlCommand("腾讯QQ2012 安装向导","在安装软件前, 请仔细阅读下面的软件许可协议和青少年上网安全指引。","Button3","IsEnabled")
Until $wer = 1
ControlClick("腾讯QQ2012 安装向导","在安装软件前, 请仔细阅读下面的软件许可协议和青少年上网安全指引。","Button3")
WinWait("腾讯QQ2012 安装向导","安装QQ工具栏及中文搜搜")
ControlCommand("腾讯QQ2012 安装向导","安装QQ工具栏及中文搜搜","Button9","UnCheck")
ControlCommand("腾讯QQ2012 安装向导","安装QQ工具栏及中文搜搜","Button12","UnCheck")
ControlCommand("腾讯QQ2012 安装向导","安装QQ工具栏及中文搜搜","Button17","UnCheck")
ControlCommand("腾讯QQ2012 安装向导","安装QQ工具栏及中文搜搜","Button18","UnCheck")
ControlCommand("腾讯QQ2012 安装向导","安装QQ工具栏及中文搜搜","Button7","UnCheck")
ControlClick("腾讯QQ2012 安装向导","安装QQ工具栏及中文搜搜","Button2")
WinWait("腾讯QQ2012 安装向导","程序安装目录")
ControlSetText("腾讯QQ2012 安装向导","程序安装目录","Edit1","d:\Program Files\Tencent\QQ")
ControlClick("腾讯QQ2012 安装向导","程序安装目录","Button2")
WinWait("腾讯QQ2012 安装向导","安装完成")
ControlCommand("腾讯QQ2012 安装向导","安装完成","Button8","UnCheck")
ControlCommand("腾讯QQ2012 安装向导","安装完成","Button6","UnCheck")
ControlCommand("腾讯QQ2012 安装向导","安装完成","Button7","UnCheck")
ControlCommand("腾讯QQ2012 安装向导","安装完成","Button9","UnCheck")
ControlClick("腾讯QQ2012 安装向导","安装完成","Button2")
Exit