zhangchongzhi 发表于 2011-9-18 16:09:14

一些常用软件安装脚本,大家看有什么改进的

本帖最后由 zhangchongzhi 于 2011-9-18 16:22 编辑

1.QQ2011Beta4
2.QQGameBeta3
3.PPS
4.暴风5
5.酷我音乐盒
6.迅雷7
7.搜狗拼音
8.搜狗五笔

zhangchongzhi 发表于 2011-9-18 16:09:53

QQ#RequireAdmin
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=icon\QQ.ico
#AutoIt3Wrapper_outfile=qqsetup.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****

;欢迎使用腾讯QQ2011
$title="腾讯QQ2011 安装向导"
Run("QQ2011Beta4.exe")
WinWait($title,"欢迎使用腾讯QQ2011")
WinActivate($title,"欢迎使用腾讯QQ2011")
ControlCommand($title,"我已阅读并同意软件许可协议和青少年上网安全指引","Button1","Check","")
ControlClick($title,"下一步(&N)","Button3","left",1)

;请选择自定义安装选项与快捷方式选项
WinWait($title,"请选择自定义安装选项与快捷方式选项")
WinActivate($title,"请选择自定义安装选项与快捷方式选项")
ControlCommand($title,"安装QQ工具栏及中文搜搜","Button9","UnCheck","")
ControlCommand($title,"安装QQ音乐播放器","Button12","UnCheck","")
ControlCommand($title,"安装腾讯视频播放器","Button17","UnCheck","")
ControlCommand($title,"安装QQ电脑管家,保护QQ帐号安全","Button18","UnCheck","")
ControlCommand($title,"快速启动栏","Button7","UnCheck","")
ControlClick($title,"下一步(&N)","Button2","left",1)
;请选择安装路径
WinWait($title,"请选择安装路径")
WinActivate($title,"请选择安装路径")
ControlSetText($title,"请选择安装路径","Edit1","C:\Program Files\Tencent\QQ")
ControlClick($title,"安装(&I)","Button2","left",1)

;软件更新方式
If WinWait($title,"软件更新方式",180) Then
        WinActivate($title,"软件更新方式")
        ControlCommand($title,"有更新时不要安装,但提醒我","Button2","Check","")
        ControlClick($title,"下一步(&N)","Button4","left",1)
EndIf
;安装完成
WinWait($title,"安装完成")
WinActivate($title,"安装完成")
ControlCommand($title,"立即运行腾讯QQ2011","Button6","UnCheck","")
ControlCommand($title,"开机时自动启动腾讯QQ2011","Button8","UnCheck","")
ControlCommand($title,"设置腾讯网为主页","Button9","UnCheck","")
ControlCommand($title,"显示新特性","Button7","UnCheck","")
ControlClick($title,"完成(&F)","Button2","left",1)

;删除webqq图标
FileDelete(@DesktopDir & "\" & "WebQQ.url")

Exit

zhangchongzhi 发表于 2011-9-18 16:10:29

QQGame#RequireAdmin
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=icon\QQGame.ico
#AutoIt3Wrapper_outfile=qqgamesetup.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****

$title="QQ游戏2011Beta3 安装"
Run("QQGame.exe")
;欢迎使用“QQ游戏2011Beta3”安装向导
WinWait($title,"欢迎使用“QQ游戏2011Beta3”安装向导")
WinActivate($title,"欢迎使用“QQ游戏2011Beta3”安装向导")
ControlClick($title,"下一步(&N) >","Button2","left",1)
;许可证协议
WinWait($title,"许可证协议")
WinActivate($title,"许可证协议")
ControlClick($title,"我接受(&I)","Button2","left",1)
;选择安装位置
WinWait($title,"选择安装位置")
WinActivate($title,"选择安装位置")
ControlSetText($title,"选择安装位置","Edit1","C:\Program Files\腾讯游戏\QQGAME\")
ControlClick($title,"安装(&I)","Button2","left",1)
;安装完成
WinWait($title,"安装完成")
WinActivate($title,"安装完成")
ControlClick($title,"下一步(&N) >","Button2","left",1)
;安装选项
WinWait($title,"安装选项")
WinActivate($title,"安装选项")
ControlCommand($title,"启动QQ游戏大厅","Button4","UnCheck","")
ControlCommand($title,"启用QQ游戏启动加速程序","Button5","UnCheck","")
ControlCommand($title,"添加3366快捷方式到桌面","Button7","UnCheck","")
ControlClick($title,"下一步(&N) >","Button2","left",1)
;正在完成“QQ游戏2011Beta3”安装向导
If WinWait($title,"正在完成“QQ游戏2011Beta3”安装向导",3) Then
WinActivate($title,"正在完成“QQ游戏2011Beta3”安装向导")
ControlCommand($title,"安装QQ管家电脑管家","Button4","UnCheck","")
ControlClick($title,"完成(&L)","Button2","left",1)
EndIf
Exit

zhangchongzhi 发表于 2011-9-18 16:12:15

PPS#RequireAdmin
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=icon\ppstream.ico
#AutoIt3Wrapper_outfile=ppstreamsetup.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****


$title="PPS影音 V2.7.0.1310 正式版"
Run("ppstream.exe")

IfWinWait($title,"PPS影音正在运行中, 安装可能遇到问题。",5) Then
        WinActivate($title,"PPS影音正在运行中, 安装可能遇到问题。")
        ControlClick($title,"是(&Y)","Button1","left",1)
EndIf
#cs`
If WinWait("新版本提示 - PPS影音","发现有新版本PPS影音,推荐更新以获得更好体验!",5) Then
        WinActivate("新版本提示 - PPS影音","发现有新版本PPS影音,推荐更新以获得更好体验!")
        ControlClick("新版本提示 - PPS影音","否(&N)","Button3","left",1)
EndIf
#ce
;PPS影音 安装向导
WinWait($title,"PPS影音 安装向导")
WinActivate($title,"PPS影音 安装向导")
ControlClick($title,"我接受(&I)","Button2","left",1)
;选择附加任务
WinWait($title,"选择附加任务")
WinActivate($title,"选择附加任务")
ControlSetText($title,"选择PPS影音安装目录","Edit1","C:\Program Files\PPStream")
ControlCommand($title,"创建PPS快捷方式","Button10","Check","")
ControlCommand($title,"安装PPS影讯屏保","Button12","UnCheck","")
ControlCommand($title,"开机PPS自动运行","Button11","UnCheck","")
ControlCommand($title,"使用PPS关联文件","Button13","UnCheck","")
ControlClick($title,"安装(&I)","Button2","left",1)

#cs
;安装 Google 工具栏
WinWait("安装 Google 工具栏","免费的 Google 工具栏,搜索更简单")
WinActivate("安装 Google 工具栏","免费的 Google 工具栏,搜索更简单")
ControlCommand("安装 Google 工具栏","安装 Google 工具栏","Button4","UnCheck","")
ControlClick("安装 Google 工具栏","下一步(&N) >","Button2","left",1)

;选择推荐软件
WinWait($title,"选择推荐软件")
WinActivate($title,"选择推荐软件")
ControlCommand($title,"PPS游戏大厅","Button4","UnCheck","")
ControlCommand($title,"360杀毒永久免费版","Button5","UnCheck","")
ControlCommand($title,"快车","Button6","UnCheck","")
ControlClick($title,"安装(&I)","Button2","left",1)
#ce
;PPS影音 完成安装
WinWait($title,"PPS影音 完成安装")
WinActivate($title,"PPS影音 完成安装")
ControlCommand($title,"运行 PPS影音","Button4","UnCheck","")
;ControlCommand($title,"设置PPS网址导航为主页","Button7","UnCheck","")
ControlClick($title,"完成(&F)","Button2","left",1)

Sleep(2000)

If ProcessExists("iexplore.exe")Then
      ProcessClose("iexplore.exe")
        EndIf

Exit

zhangchongzhi 发表于 2011-9-18 16:13:23

本帖最后由 zhangchongzhi 于 2011-10-19 12:07 编辑

暴风5#RequireAdmin
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=icon\Storm.ico
#AutoIt3Wrapper_outfile=baofeng5setup.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
Opt("MouseCoordMode", 0)
$title = "安装 暴风影音5 Beta2版"
Run("Baofeng5.exe")

If WinWait($title, "您的电脑已经安装了暴风影音", 3) Then
        WinActivate($title, "您的电脑已经安装了暴风影音")
        ControlClick($title, "是(&Y)", "Button1", "left", 1)
EndIf

;许可协议
WinWait($title, "许可协议")
WinActivate($title, "许可协议")
ControlClick($title, "接受(&I) >", "Button2", "left", 1)

;下一步(&N) >
WinWait($title, "下一步(&N) >")
WinActivate($title, "下一步(&N) >")
ControlClick($title, "下一步(&N) >", "Button2", "left", 1)

;程序安装目录
WinWait($title, "程序安装目录")
WinActivate($title, "程序安装目录")
;ControlSetText($title,"程序安装目录","Static6","d:\Program Files\Baofeng\StormPlayer\")
;MouseClick("left",73, 506,1)
MouseClickDrag("left", 270, 173, 30, 173)
Send("C:\Program Files\Baofeng\StormPlayer\")
Send("{TAB 2}")
Send("{space}")
ControlClick($title, "下一步(&N) >", "Button2", "left", 1)

;已完成
While WinExists($title,"完成(&F)")=1
        WinWait($title,"完成(&F)")
        WinActivate($title,"完成(&F)")
        ControlClick($title,"完成(&F)","Button2","left",1)
WEnd
#cs
Sleep(3000)

If ProcessExists("StormPlayer.exe") Then
        ProcessClose("StormPlayer.exe")
        ProcessClose("BaofengPlatform.exe")
EndIf
#ce

Sleep(3000)
;设置暴风影音
WinWait("","")
WinActivate("","")

Do
        Send("o")
Until WinWaitActive("")       
;WinWaitActive("")

MouseClick("left",70,225,1)
Sleep(350)
MouseClick("left",200,120,1)
Sleep(350)
MouseClick("left",200,145,1)
If WinWaitActive("","开机启动暴风可以帮您第一时间掌握最新影视信息",3) Then
        ControlClick("暴风影音提示您","确定","","left",1)
EndIf       
Sleep(350)
MouseClick("left",200,240,1)
Sleep(350)
MouseClick("left",300,400,1)
Sleep(350)
WinClose("","")

Exit

zhangchongzhi 发表于 2011-9-18 16:13:55

酷我音乐盒#RequireAdmin
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=icon\kuwo.ico
#AutoIt3Wrapper_outfile=kuwosetup.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****

$title="酷我音乐盒 2011 安装"
;欢迎使用
Run("kuwo2011.exe")
WinWait($title,"欢迎使用 酷我音乐盒 2011 安装向导")
WinActivate($title,"欢迎使用 酷我音乐盒 2011 安装向导")
ControlClick($title,"下一步(&N) >","Button2","left",1)
;许可协议
WinWait($title,"许可协议")
WinActivate($title,"许可协议")
ControlClick($title,"我同意(&I)","Button2","left",1)
;选择安装位置
WinWait($title,"选择安装位置")
WinActivate($title,"选择安装位置")
ControlSetText($title,"选择安装位置","Edit1","C:\Program Files\KWMUSIC")
ControlClick($title,"下一步(&N) >","Button2","left",1)
; 酷我推荐:百度工具栏
WinWait($title," 酷我推荐:百度工具栏")
WinActivate($title," 酷我推荐:百度工具栏")
ControlCommand($title,"我要安装百度工具栏","Button4","UnCheck","")
ControlClick($title,"安装(&I)","Button2","left",1)
;完成 酷我音乐盒 2011 安装向导
WinWait($title,"完成 酷我音乐盒 2011 安装向导")
WinActivate($title,"完成 酷我音乐盒 2011 安装向导")
ControlCommand($title,"立即运行酷我音乐盒","Button4","UnCheck","")
ControlCommand($title,"开机自动运行酷我音乐盒","Button5","UnCheck","")

If ControlGetText($title,"PPS影音,清晰流畅更新快,免费节目超过20万套","Button7")="PPS影音,清晰流畅更新快,免费节目超过20万套" Then
ControlCommand($title,"PPS影音,清晰流畅更新快,免费节目超过20万套","Button7","UnCheck","")
ControlCommand($title,"360安全产品 全面保护上网安全","Button8","UnCheck","")
EndIf

ControlClick($title,"完成(&F)","Button2","left",1)
;删除“酷我游戏”快捷方式
FileDelete(@DesktopCommonDir & "\" & "酷我游戏.lnk")

zhangchongzhi 发表于 2011-9-18 16:14:36

迅雷7#RequireAdmin
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=icon\Thunder.ico
#AutoIt3Wrapper_outfile=thundersetup.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****

$title="迅雷7安装程序"

Run("Thunder7.exe")

;软件许可协议
WinWait($title,"软件许可协议")
ControlClick($title,"软件许可协议","Button1","left",1)

Sleep(2000)
;选择安装目录
WinWait($title,"")
ControlSetText($title,"","Edit1","C:\Program Files\Thunder Network\Thunder")
ControlClick($title,"","Button7","left",1)
       
        WinWait("迅雷7","")
        ControlClick("迅雷7","","Button2","left",1)
        Sleep(2000)
        WinWait($title,"")
        ControlClick($title,"","Button1","left",1)
        Sleep(2000)
        WinWait("迅雷7","")
        ControlClick("迅雷7","","Button2","left",1)

;安装完成
WinWait($title,"")
While1
      If ControlGetHandle($title,"","Button4") Then exitloop
      Sleep(1000)
WEnd

ControlClick($title,"","Button4","left",1)
;ControlCommand($title,"","Button4","UnCheck","") 不能用

ControlClick($title,"","Button1","left",1)

WinWait($title,"")
While1
      If ControlGetHandle($title,"","Button7") Then exitloop
      Sleep(1000)
WEnd
ControlClick($title,"","Button7","left",1)
ControlClick($title,"","Button4","left",1)
ControlClick($title,"","Button5","left",1)
ControlClick($title,"","Button1","left",1)

FileDelete(@DesktopCommonDir &"\" & "迅雷看看-免费高清电影.lnk")
FileDelete(@DesktopCommonDir & "\" & "迅雷高清影片免费下载.lnk")

Exit

zhangchongzhi 发表于 2011-9-18 16:15:04

搜狗拼音#RequireAdmin
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=icon\sogou_pinyin.ico
#AutoIt3Wrapper_outfile=pinyinsetup.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****

$title="搜狗拼音输入法 6.0正式版 安装"
$title1="搜狗拼音输入法 个性化设置向导"
Run("sogou_pinyin.exe")
;欢迎使用“搜狗拼音输入法 6.0正式版”
WinWait($title,"欢迎使用“搜狗拼音输入法 6.0正式版”")
WinActivate($title,"欢迎使用“搜狗拼音输入法 6.0正式版”")
ControlClick($title,"下一步(&N) >","Button2","left",1)
;许可证协议
WinWait($title,"许可证协议")
WinActivate($title,"许可证协议")
ControlClick($title,"我接受(&I)","Button2","left",1)
;选择安装位置
WinWait($title,"选择安装位置")
WinActivate($title,"选择安装位置")
ControlSetText($title,"目标文件夹","Edit1","C:\Program Files\SogouInput\")
ControlClick($title,"下一步(&N) >","Button2","left",1)
;选择“开始菜单”文件夹
WinWait($title,"选择“开始菜单”文件夹")
WinActivate($title,"选择“开始菜单”文件夹")
ControlClick($title,"下一步(&N) >","Button2","left",1)

;选择安装“附加软件”
If WinWait($title,"选择安装“附加软件”",3) Then
WinActivate($title,"选择安装“附加软件”")
ControlCommand($title,"安装搜狗高速浏览器","Button4","UnCheck","")
ControlClick($title,"安装(&I)","Button2","left",1)
EndIf
;安装完毕
WinWait($title,"安装完毕")
WinActivate($title,"安装完毕")
ControlCommand($title,"设置搜狗导航为您的默认首页","Button5","UnCheck","")
ControlClick($title,"完成(&F)","Button1","left",1)

WinWait($title1,"")
WinActivate($title1,"")
ControlClick($title1,"下一步(&N) >","Button2","left",1)
WinWait($title1,"立即启用")
WinActivate($title1,"立即启用")
ControlClick($title1,"下一步(&N) >","Button2","left",1)
WinWait($title1,"完成(&F)")
WinActivate($title1,"完成(&F)")
ControlClick($title1,"完成(&F)","Button2","left",1)

IfProcessExists("IEXPLORE.EXE") Then
      ProcessClose("IEXPLORE.EXE")
Endif

Exit

zhangchongzhi 发表于 2011-9-18 16:15:31

搜狗五笔#RequireAdmin
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=icon\sogou_wubi.ico
#AutoIt3Wrapper_outfile=wubisetup.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****

$title="搜狗五笔输入法 2.0正式版 安装"
$title2="搜狗五笔输入法 个性化设置向导"
Run("sogou_wubi.exe")
If WinWait($title,"您的系统里已经安装了最新版或相同版本",3) Then
        WinActivate($title,"您的系统里已经安装了最新版或相同版本")
        ControlClick($title,"是(&Y)","Button1","left",1)
EndIf
;欢迎使用“搜狗五笔输入法 2.0正式版”安装向导
WinWait($title,"欢迎使用“搜狗五笔输入法 2.0正式版”安装向导")
WinActivate($title,"欢迎使用“搜狗五笔输入法 2.0正式版”安装向导")
ControlClick($title,"下一步(&N) >","Button2","left",1)
;许可证协议
WinWait($title,"许可证协议")
WinActivate($title,"许可证协议")
ControlClick($title,"我同意(&I)","Button2","left",1)
;选择安装位置
WinWait($title,"选择安装位置")
WinActivate($title,"选择安装位置")
ControlSetText($title,"目标文件夹","Edit1","C:\Program Files\SogouWBInput\")
ControlClick($title,"下一步(&N) >","Button2","left",1)
;选择“开始菜单”文件夹
WinWait($title,"选择“开始菜单”文件夹")
WinActivate($title,"选择“开始菜单”文件夹")
ControlClick($title,"安装(&I)","Button2","left",1)
;正在完成“搜狗五笔输入法 2.0正式版”安装向导
WinWait($title,"正在完成“搜狗五笔输入法 2.0正式版”安装向导")
WinActivate($title,"正在完成“搜狗五笔输入法 2.0正式版”安装向导")
ControlClick($title,"完成(&F)","Button2","left",1)

WinWait($title2,"欢迎您使用搜狗五笔输入法")
WinActivate($title2,"欢迎您使用搜狗五笔输入法")
ControlClick($title2,"下一步(&N) >","Button2","left",1)
WinWait($title2,"让搜狗五笔成为您的个人专属输入法")
WinActivate($title2,"让搜狗五笔成为您的个人专属输入法")
ControlClick($title2,"下一步(&N) >","Button2","left",1)
WinWait($title2,"启用您的网络随身输入法")
WinActivate($title2,"启用您的网络随身输入法")
ControlClick($title2,"下一步(&N) >","Button2","left",1)
WinWait($title2,"输入法皮肤设置")
WinActivate($title2,"输入法皮肤设置")
ControlClick($title2,"下一步(&N) >","Button2","left",1)
WinWait($title2,"感谢您使用搜狗五笔输入法设置向导")
WinActivate($title2,"感谢您使用搜狗五笔输入法设置向导")
ControlClick($title2,"完成(&F)","Button2","left",1)
Exit

Ycxw2008 发表于 2011-9-18 17:49:34

感谢樓主,我太愛你了,我就喜歡這樣的.万分感谢

zfyczyh 发表于 2011-9-18 23:22:21

谢谢楼主分享经验

Ycxw2008 发表于 2011-9-19 09:42:40

楼主这脚本是大概怎么写的呢?开着窗口信息工具,然后自己一步一步些吗

zhangchongzhi 发表于 2011-9-19 13:01:07

回复 12# Ycxw2008


   是呗。有需要就得做啊。给自己装新机子用的。迅雷7的好像不太好哎,看看有什么改进的。

Ycxw2008 发表于 2011-9-20 05:14:11

回复 13# zhangchongzhi
话说我是迅雷年费会员,不过很久没用过官方版了

飞越星海 发表于 2011-9-20 16:01:14

自己写也是一种乐趣!!!自己也写写!!!呵呵
页: [1] 2 3
查看完整版本: 一些常用软件安装脚本,大家看有什么改进的