Run('QQ2009.exe')
WinWait("腾讯QQ2009 安装向导","我已阅读并同意软件许")
If Not WinActive("腾讯QQ2009 安装向导","我已阅读并同意软件许") Then WinActivate("腾讯QQ2009 安装向导","我已阅读并同意软件许")
WinWaitActive("腾讯QQ2009 安装向导","我已阅读并同意软件许")
ControlClick("腾讯QQ2009 安装向导","我已阅读并同意软件许","Button1")
Send("{ALTDOWN}n{ALTUP}")
WinWait("腾讯QQ2009 安装向导","自定义安装选项")
If Not WinActive("腾讯QQ2009 安装向导","自定义安装选项") Then WinActivate("腾讯QQ2009 安装向导","自定义安装选项")
WinWaitActive("腾讯QQ2009 安装向导","自定义安装选项")
ControlClick("腾讯QQ2009 安装向导","安装QQ软件管理","Button8")
ControlClick("腾讯QQ2009 安装向导","安装中文搜搜","Button9")
ControlClick("腾讯QQ2009 安装向导","安装QQ拼音输入法","Button10")
ControlClick("腾讯QQ2009 安装向导","安装QQ音乐播放器","Button11")
ControlClick("腾讯QQ2009 安装向导","快速启动栏","Button7")
Send("{ALTDOWN}n{ALTUP}")
WinWait("腾讯QQ2009 安装向导","腾讯QQ2009 安装向导")
If Not WinActive("腾讯QQ2009 安装向导","腾讯QQ2009 安装向导") Then WinActivate("腾讯QQ2009 安装向导","腾讯QQ2009 安装向导")
WinWaitActive("腾讯QQ2009 安装向导","请选择安装路径")
ControlSetText("腾讯QQ2009 安装向导","请选择安装路径","Edit1","D:\Program Files\QQ")
ControlClick("腾讯QQ2009 安装向导","","Button8")
Send("{ALTDOWN}I{ALTUP}")
WinWait("腾讯QQ2009 安装向导","安装完成")
If Not WinActive("腾讯QQ2009 安装向导","安装完成") Then WinActivate("腾讯QQ2009 安装向导","安装完成")
WinWaitActive("腾讯QQ2009 安装向导","安装完成")
ControlClick("腾讯QQ2009 安装向导","立即运行腾讯QQ2009","Button6")
ControlClick("腾讯QQ2009 安装向导","开机时自动启动腾讯QQ2009","Button8")
ControlClick("腾讯QQ2009 安装向导","设置腾讯网为主页","Button9")
ControlClick("腾讯QQ2009 安装向导","显示新特性","Button7")
Send("{ALTDOWN}f{ALTUP}")
这是SP5版的