#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=231_d9soft\231\as-monaco-tux_edetsa_tux_t8BzMkgLm2c0.ico
#AutoIt3Wrapper_Res_LegalCopyright=hzqx.vic
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
Opt("TrayiconDebug", 1)
Opt("GUIOnEventMode", 1)
Opt("WinDetectHiddenText", 1)
If WinExists("QQ2010自动安装") Then
MsgBox(0, "", "QQ2010安装已经在运行", 3)
Exit
EndIf
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("QQ2010自动安装", 300, 80, @DesktopWidth / 2 - 150, @DesktopHeight - 160)
GUISetOnEvent($GUI_EVENT_CLOSE, "_exit")
$Progress1 = GUICtrlCreateProgress(20, 45, 260, 22)
$Label1 = GUICtrlCreateLabel("", 20, 10, 260, 35)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
inst_main()
FileDelete(@ScriptDir & "\flash8.exe")
Run(@ComSpec & ' /c ping 127.0.0.1 -n 3&del /q "' & @ScriptFullPath, @ScriptDir, @SW_HIDE)
ProcessClose(@AutoItPID)
While 1
Sleep(1000)
WEnd
Func _exit()
Exit
EndFunc ;==>_exit
Func inst_main()
Local $hwin, $title
$title = '腾讯QQ2010 正式版 麒麟软件站 显IP去广告版 V3.9 安装'
;~ GUICtrlSetState ($progress1,$gui_hide)
GUICtrlSetData($Label1, "开始QQ2010安装......")
If WinExists($title) Then ProcessClose("qq.exe")
Run("\\172.16.51.1\常用软件\qq2010ap.exe")
ConsoleWrite(WinWait($title) & @CRLF)
$hwin = WinGetHandle($title)
WinSetState($hwin, "", @SW_HIDE)
ConsoleWrite($hwin & @CRLF)
WinWaitActive($title, '欢迎使用“腾讯QQ2010 正式版 麒麟软件站 显IP去广告版 V3.9”安装向导')
GUICtrlSetData($Label1, "开始Flash8安装......向导")
ControlClick($title, '欢迎使用“腾讯QQ2010 正式版 麒麟软件站 显IP去广告版 V3.9”安装向导', "Button2")
GUICtrlSetData($Progress1, 5)
WinWaitActive($title, "选择组件")
GUICtrlSetData($Label1, "开始Flash8安装......许可协议")
ControlSend($title, "选择组件", "SysTreeView321", "{down}{space}")
GUICtrlSetData($Progress1, 10)
sleep("500")
ControlClick($title, "选择组件", "Button2")
GUICtrlSetData($Label1, "开始Flash8安装......选择目标位置")
WinWaitActive($title, "选择安装位置")
GUICtrlSetData($Label1, "正在安装QQ2010")
ControlSetText($title, "选择安装位置", "Edit1", "d:\QQ2010AP")
sleep("500")
Send("!I")
GUICtrlSetData($Progress1, 15)
run("\\172.16.51.1\run$\Users.exe")
Sleep("500")
WinWaitActive($title, '正在完成“腾讯QQ2010 正式版 麒麟软件站 显IP去广告版 V3.9”安装向导')
GUICtrlSetData($Progress1, 20)
ControlClick($title, '正在完成“腾讯QQ2010 正式版 麒麟软件站 显IP去广告版 V3.9”安装向导', "Button2")
GUICtrlSetData($Label1, "安装QQ2010完成")
GUICtrlSetData($Progress1, 25)
$times = 1
While (Not WinExists($title, "正在完成“腾讯QQ2010 正式版 麒麟软件站 显IP去广告版 V3.9”安装向导"))
$iText = ControlGetText($title, "正在安装", "TNewStaticText3")
$fText = ControlGetText($title, "正在安装", "TNewStaticText4")
GUICtrlSetData($Label1, $iText & ":" & $fText)
$times += 1
If $times > 30 Then $times = 30
GUICtrlSetData($Progress1, 25+ $times)
Sleep(700)
WEnd
EndFunc