$file='暴风影音5.21.0115.1111.exe'
If Not FileExists($file) Then Exit
Run($file)
If WinWait("暴风影音安装提示") Then ;如果已经安装过暴风影音,确认覆盖安装
WinActivate("暴风影音安装提示")
WinWaitActive("暴风影音安装提示")
ControlClick("暴风影音安装提示", "", "Button1")
EndIf
$Hwnd=WinWait('安装 暴风影音5 正式版')
;等待欢迎界面控件可见
Do
Sleep(300)
Until ControlCommand($Hwnd,'','SkinWindow1','IsVisible')
;点击下一步
ControlClick($Hwnd,'','SkinWindow1','',1,478,376)
;等待选项界面控件可见
Do
Sleep(300)
Until ControlCommand($Hwnd,'','SkinWindow2','IsVisible')
;点击附加的广告选项
ControlClick($Hwnd,'','SkinWindow2','',1,142,231)
ControlClick($Hwnd,'','SkinWindow2','',1,142,256)
ControlClick($Hwnd,'','SkinWindow2','',1,142,280)
ControlClick($Hwnd,'','SkinWindow2','',1,142,302)
;点击下一步
Sleep(500)
ControlClick($Hwnd,'','SkinWindow2','',1,473,373)
Sleep(17000)
Do
Sleep(300)
Until ControlCommand($Hwnd,'','SkinWindow4','IsVisible')
WinActivate($Hwnd,'')
WinWaitActive($Hwnd,'')
ControlClick($Hwnd,'','SkinWindow4','',1,473,373)
Sleep(1000)
WinWait('新功能推荐-暴风影音')
Sleep(100)
ProcessClose("Welcome.exe")
ProcessClose("StormPlayer.exe")
ProcessClose("baofengplatform.exe")
RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run","BaofengPlatform")
FileDelete(@AppDataDir & "\Microsoft\Internet Explorer\Quick Launch\暴风影音5.lnk")
Opt('TrayIconHide',1);刷新一下
Opt('TrayIconHide',0)