sunnday 发表于 2011-5-4 18:52:38

QQ2011官方BATA2自动安装~~小试牛刀

$Teet="腾讯QQ2011 安装向导"
$Teet2="请选择安装路径"
$Teet3=""
$Teet4="欢迎使用腾讯QQ2011"
$Teet5="我已阅读并同意软件许可协议和青少年上网安全指引"
$Teet6="请选择自定义安装选项与快捷方式选项"
$Teet7="安装完成"
ShellExecute("QQ2011.exe","",@ScriptDir,"open")

TrayTip("正在安装程序","安装过程请勿安装其他软件",5,1)
WinWait($Teet,$Teet4)
WinActivate($Teet,$Teet4)
ControlClick($Teet,$Teet5,"Button1")
ControlClick($Teet,$Teet4,"")

WinWait($Teet,$Teet6)
WinActivate($Teet,$Teet6)
ControlClick($Teet,$Teet6,"")
ControlClick($Teet,$Teet6,"")
ControlClick($Teet,$Teet6,"")
ControlClick($Teet,$Teet6,"")
ControlClick($Teet,$Teet6,"")

WinWait($Teet,$Teet2)
WinActivate($Teet,$Teet2)
ControlSetText($Teet,$Teet3,"Edit1","d:\Program Files\Tencent\QQ")
ControlClick($Teet,$Teet2,"")
ControlClick($Teet,$Teet2,"")

WinWait($Teet,"正在提取安装文件")
WinWaitClose($Teet,"正在提取安装文件")
While 1
        If ControlGetHandle($Teet,$Teet7,"Button6") Then ExitLoop
WEnd
ControlClick($Teet,$Teet7,"Button6")
ControlClick($Teet,$Teet7,"Button8")
ControlClick($Teet,$Teet7,"Button9")
ControlClick($Teet,$Teet7,"Button7")
ControlClick($Teet,$Teet7,"Button2")

ProcessClose("QQ2011.exe")


不多说废话 由于前面那个要付费以致大家舍不得看介于大家的要求把代码发出
希望版主不要责怪发同样的帖子

xin266 发表于 2011-12-28 10:34:23

哈哈 不错的
页: [1]
查看完整版本: QQ2011官方BATA2自动安装~~小试牛刀