找回密码
 加入
搜索
查看: 14262|回复: 13

[原创] 几个常用软件的安装,交流

 火.. [复制链接]
发表于 2011-3-4 21:43:34 | 显示全部楼层 |阅读模式
本帖最后由 zhangchongzhi 于 2011-4-22 15:58 编辑

不好的地方欢迎指正,共同进步!!
我会不断改的,一直到最好.  欢迎收藏^_^


1。office2003
#RequireAdmin
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=Office2003-SP3.exe|-1
#AutoIt3Wrapper_outfile=office2003setup.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****

$title="Microsoft Office 2003 安装"

Run("Office2003-sp3.exe")

;用户信息
WinWait($title,"用户信息")
ControlSetText($title,"用户信息","RichEdit20W1","LenovoUser")
ControlSetText($title,"用户信息","RichEdit20W2","LenovoUser")
ControlSetText($title,"用户信息","RichEdit20W3","RuiCheng")
Send("!n")

;安装类型
WinWait($title,"安装类型")
ControlCommand($title,"典型安装(&T)","Button2","Check")
ControlSetText($title,"安装类型","RichEdit20W1","C:\Program Files\Microsoft Office")
Send("!n")

;摘要
WinWait($title,"摘要")
Send("!i")

;安装已完成
WinWait($title,"安装已完成")
ControlClick($title,"完成(&F)","Button2","left",1)

;Delete desktop icons
FileDelete(@DesktopCommonDir & "" & "Microsoft Office PowerPoint 2003.lnk")
FileDelete(@DesktopCommonDir & "" & "Microsoft Office Outlook 2003.lnk")
FileDelete(@DesktopCommonDir & "" & "Microsoft Office Access 2003.lnk")

Exit
2.酷我音乐盒
#RequireAdmin
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=kuwo2011.exe|-1
#AutoIt3Wrapper_outfile=kuwomusicsetup.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****


$title="酷我音乐盒 2011 安装"

Run("kuwo2011.exe")

;欢迎
WinWait($title,"欢迎使用 酷我音乐盒 2011 安装向导")
WinActivate($title,"欢迎使用 酷我音乐盒 2011 安装向导")
Send("!n")

;许可协议
WinWait($title,"许可协议")
Send("!i")

;选择安装位置
WinWait($title,"选择安装位置")
ControlSetText($title,"选择安装位置","Edit1","C:\Program Files\KWMUSIC")
Send("!n")

;百度工具栏XX
WinWait($title,"百度工具栏")
ControlCommand($title,"我要安装百度工具栏","Button4","UnCheck")
Send("!i")

;完成 酷我音乐盒 2010 安装向导
WinWait($title,"完成 酷我音乐盒 2011 安装向导")
ControlCommand($title,"立即运行酷我音乐盒","Button4","UnCheck")
ControlCommand($title,"开机自动运行酷我音乐盒","Button5","UnCheck")
ControlCommand($title,"打开新功能介绍","Button6","UnCheck")

;酷我推还推荐如下精品软件:
If  ControlGetText($title,"酷我推还推荐如下精品软件:","Button7")="360安全产品 全面保护上网安全" Then 
        ControlCommand($title,"360安全产品 全面保护上网安全","Button7","UnCheck")
        ControlCommand($title,"快玩:我电脑里的全能游戏机,所有游戏一点即玩","Button8","UnCheck")
        ControlCommand($title,"PPS影音,清晰流畅更新快,免费节目超过20万套","Button9","UnCheck")
ElseIf ControlGetText($title,"酷我推还推荐如下精品软件:","Button7")="快玩:我电脑里的全能游戏机,所有游戏一点即玩" Then 
        ControlCommand($title,"快玩:我电脑里的全能游戏机,所有游戏一点即玩","Button7","UnCheck")
EndIf 

ControlClick($title,"完成(&F)","Button2","left",1)

FileDelete(@DesktopCommonDir & "" & "酷我音乐文件夹.lnk")

Exit
3。暴风影音
#RequireAdmin
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=Storm2011.exe|-1
#AutoIt3Wrapper_outfile=stormsetup.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****


$title="安装 暴风影音 2011"

Run("Storm2011.exe")

;欢迎
WinWait($title,"欢迎安装 暴风影音 2011")
Send("!n")

;许可证协议
WinWait($title,"许可证协议")
Send("!i")

;选择组件和需要创建的快捷方式
WinWait($title,"选择组件和需要创建的快捷方式")
Send("{down 2},{right},{down 2},{space}")
Send("!n")

;选择安装位置
WinWait($title,"选择安装位置")
ControlSetText($title,"选择安装位置","Edit1","C:\Program Files\StormII")
Send("!n")

;免费的百度工具栏
WinWait($title,"免费的百度工具栏")
ControlCommand($title,"安装百度工具栏","Button4","UnCheck")
Send("!i")

While WinExists($title,"暴风影音[3.11.04.06] 安装完成")=0
        select
                Case  WinExists($title,"选择需要下载的播放组件")=1 
                        WinActivate($title,"选择需要下载的播放组件")
                        Send("!n")
                        ;暴风影音推荐软件
                        WinWait($title,"暴风影音推荐软件")
                        ControlCommand($title,"360杀毒永久免费版","Button4","UnCheck")
                        ControlCommand($title,"安装快车(FlashGet)","Button5","UnCheck")
                        ControlCommand($title,"酷狗音乐","Button6","UnCheck")
                        ControlCommand($title,"傲游浏览器3.0","Button7","UnCheck")
                        Send("!n")
                Case  WinExists($title,"暴风影音推荐软件")=1 
                        WinActivate($title,"暴风影音推荐软件")
                        ControlCommand($title,"360杀毒永久免费版","Button4","UnCheck")
                        ControlCommand($title,"安装快车(FlashGet)","Button5","UnCheck")
                        ControlCommand($title,"酷狗音乐","Button6","UnCheck")
                        ControlCommand($title,"傲游浏览器3.0","Button7","UnCheck")
                        Send("!n")
        EndSelect
Wend

#cs
While 1
                If   WinExists($title,"选择需要下载的播放组件")=1 Then 
                        WinActivate($title,"选择需要下载的播放组件")
                        Send("!n")
                        ;暴风影音推荐软件
                        WinWait($title,"暴风影音推荐软件")
                        ControlCommand($title,"360杀毒永久免费版","Button4","UnCheck")
                        ControlCommand($title,"安装快车(FlashGet)","Button5","UnCheck")
                        ControlCommand($title,"酷狗音乐","Button6","UnCheck")
                        ControlCommand($title,"傲游浏览器3.0","Button7","UnCheck")
                        Send("!n")
                ElseIf   WinExists($title,"暴风影音推荐软件")=1 Then 
                        WinActivate($title,"暴风影音推荐软件")
                        ControlCommand($title,"360杀毒永久免费版","Button4","UnCheck")
                        ControlCommand($title,"安装快车(FlashGet)","Button5","UnCheck")
                        ControlCommand($title,"酷狗音乐","Button6","UnCheck")
                        ControlCommand($title,"傲游浏览器3.0","Button7","UnCheck")
                        Send("!n")
                EndIf        
Wend
#ce
;暴风影音[3.11.01.01] 安装完成
WinWait($title,"暴风影音[3.11.04.06] 安装完成")
ControlCommand($title,"运行 暴风影音 2011","Button4","UnCheck")
ControlClick($title,"完成(&F)","Button2","left",1)

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

$title="PPS影音 V2.7.0.1246 正式版"

Run("ppstream.exe")

If WinWait("提示","检测到网络上存在新版PPS影音,推荐更新以获得更好的使用体验!",5) Then 
        WinActivate("提示","检测到网络上存在新版PPS影音,推荐更新以获得更好的使用体验!")
        Send("!n")
EndIf        

;开始;阅读许可协议
WinWait($title,"PPS影音 安装向导")
ControlClick($title,"我接受(&I)","Button3","left",1)

;选择附加任务
WinWait($title,"选择PPS影音安装目录")
ControlSetText($title,"选择PPS影音安装目录","Edit1","C:\Program Files\PPStream")
ControlCommand($title,"创建桌面快捷方式","Button5","Check")
ControlCommand($title,"创建快速启动快捷方式","Button6","UnCheck")
ControlCommand($title,"开机自动运行PPS影音","Button7","UnCheck")
ControlCommand($title,"安装PPS影讯屏保","Button8","UnCheck")
ControlClick($title,"下一步(&N) >","Button3","left",1)

;文件关联
WinWait($title,"PPS影音将和您的媒体文件格式进行关联")
If  ControlGetText($title,"PPS影音将和您的媒体文件格式进行关联","Button3")="安装(&I)" Then
        ControlClick($title,"安装(&I)","Button3","left",1)
                
ElseIf ControlGetText($title,"PPS影音将和您的媒体文件格式进行关联","Button3")="下一步(&N) >" Then
        ControlClick($title,"下一步(&N) >","Button3","left",1)
   
        ;选择推荐软件
        WinWait($title,"选择推荐软件",2)
        ControlClick($title,"全不选","Button8","left",1)
        ControlClick($title,"安装(&I)","Button3","left",1)
EndIf        

;PPS影音 完成安装
WinWait($title,"PPS影音 完成安装")
ControlCommand($title,"运行 PPS影音","Button4","UnCheck")
ControlCommand($title,"设置PPS网址导航为IE首页","Button7","UnCheck")
ControlClick($title,"完成(&F)","Button3","left",1)

Sleep(2000)

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

Exit
5。QQ
#RequireAdmin
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=..\QQ2010SP2.2.exe|-1
#AutoIt3Wrapper_outfile=qqsetup.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****


$title="腾讯QQ2011 安装向导"

Run("QQ2011Beta2.exe")

;欢迎
WinWait($title,"在安装软件前, 请仔细阅读下面的软件许可协议和青少年上网安全指引。")
ControlCommand($title,"我已阅读并同意软件许可协议和青少年上网安全指引","Button1","Check")
Send("!n")

;选项
WinWait($title,"请选择自定义安装选项与快捷方式选项")
ControlCommand($title,"安装QQ工具栏及中文搜搜","Button9","UnCheck")
ControlCommand($title,"安装QQ音乐播放器","Button12","UnCheck")
ControlCommand($title,"安装QQLive网络电视","Button17","UnCheck")
ControlCommand($title,"桌面","Button6","Check")
ControlCommand($title,"快速启动栏","Button7","UnCheck")
Sleep(1000)
Send("!n")

;选择
WinWait($title,"请选择安装路径")
ControlSetText($title,"请选择安装路径","Edit1","C:\Program Files\Tencent\QQ")
ControlCommand($title,"保存到“我的文档”(推荐)","Button8","Check")
Sleep(1000)
Send("!i")

;完成
WinWait($title,"安装完成")
ControlCommand($title,"立即运行腾讯QQ2011","Button6","UnCheck")
ControlCommand($title,"开机时自动启动腾讯QQ2011","Button8","UnCheck")
ControlCommand($title,"设置腾讯网为主页","Button9","UnCheck")
ControlCommand($title,"显示新特性","Button7","UnCheck")
Sleep(1000)
Send("!f")

WinWait("QQ电脑管家在线安装","QQ电脑管家在线安装",5)

While  ProcessExists("QQPCDownload.exe") 
        ProcessClose("QQPCDownload.exe")
        ProcessClose("QQPCDownloadForQQ.exe")
WEnd 

exit
6。QQ游戏
#RequireAdmin
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=QQGame.EXE|-1
#AutoIt3Wrapper_outfile=qqgamesetup.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****


$title="QQ游戏2010ReleaseP2 安装"

Run("QQGame.exe")

WinWait($title,"欢迎使用“QQ游戏2010ReleaseP2”安装向导")
Send("!n")

;许可证协议
WinWait($title,"许可证协议")
Send("!i")

;选择安装位置
WinWait($title,"选择安装位置")
ControlSetText($title,"选择安装位置","Edit1","C:\Program Files\腾讯游戏\QQGAME")
Send("!i")

;安装完成
WinWait($title,"安装完成")
Send("!n")

;安装选项
WinWait($title,"请选择您要执行的操作:")
ControlCommand($title,"启动QQ游戏大厅","Button4","UnCheck")
ControlCommand($title,"启用QQ游戏启动加速程序","Button5","UnCheck")
ControlCommand($title,"添加3366快捷方式到桌面","Button7","UnCheck")
Send("!n")

WinWait($title,"正在完成“QQ游戏2010ReleaseP1”安装向导")
ControlCommand($title,"下载并安装QQ电脑管家","Button4","UnCheck")
Send("!l")

Exit
7。搜狗拼音
#RequireAdmin
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=sogou_pinyin.exe|-1
#AutoIt3Wrapper_outfile=pinyinsetup.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****

$title="搜狗拼音输入法 5.2正式版 安装"
$title2="搜狗拼音输入法 个性化设置向导"

Run("sogou_pinyin.exe")

;欢迎
WinWait($title,"欢迎使用“搜狗拼音输入法 5.2正式版”")
ControlClick($title,"下一步(&N) >","Button2","left",1)

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

;选择安装位置
WinWait($title,"选择安装位置")
ControlSetText($title,"选择安装位置","Edit1","C:\Program Files\SogouInput")
ControlClick($title,"下一步(&N) >","Button2","left",1)

;选择“开始菜单”文件夹
WinWait($title,"选择“开始菜单”文件夹")
ControlClick($title,"下一步(&N) >","Button2","left",1)

;选择安装“附加软件”
If  WinWait($title,"选择安装“附加软件”",3) Then
        ControlCommand($title,"安装搜狗高速浏览器","Button4","UnCheck")
        ControlClick($title,"安装(&I)","Button2","left",1)
;ControlGetText($title,"选择安装“附加软件”","Button2")="安装(&I)"
EndIf
;安装完毕
WinWait($title,"安装完毕")
ControlClick($title,"完成(&F)","Button1","left",1)

Sleep(2000)
;搜狗拼音输入法 个性化设置向导
WinWait($title2,"")
ControlClick($title2,"下一步(&N) >","Button2","left",1)

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

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

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

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

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


WinWait($title2,"")
ControlClick($title2,"完成(&F)","Button2","left",1)

If  ProcessExists("IEXPLORE.EXE") Then
        ProcessClose("IEXPLORE.EXE")
Endif

exit
8。搜狗五笔
#RequireAdmin
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=sogou_wubi.exe|-1
#AutoIt3Wrapper_outfile=wubisetup.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****

$title="搜狗五笔输入法 2.0正式版 安装"
$title2="搜狗五笔输入法 个性化设置向导"

Run("sogou_wubi.exe")
WinWait($title,"欢迎使用“搜狗五笔输入法 2.0正式版”安装向导")
controlclick($title,"下一步(&N) >","Button2","left",1)

;许可证协议
WinWait($title,"许可证协议")
ControlClick($title,"我同意(&I)","Button2","left",1)

WinWait($title,"选择安装位置")
ControlSetText($title,"选择安装位置","Edit1","C:\Program Files\SogouWBInput")
ControlClick($title,"下一步(&N) >","Button2","left",1)

;选择“开始菜单”文件夹
WinWait($title,"选择“开始菜单”文件夹")
ControlClick($title,"安装(&I)","Button2","left",1)

;正在完成“搜狗五笔输入法 2.0正式版”安装向导
WinWait($title,"正在完成“搜狗五笔输入法 2.0正式版”安装向导")
ControlClick($title,"完成(&F)","Button2","left",1)

;搜狗五笔输入法 个性化设置向导
WinWait($title2,"欢迎您使用搜狗五笔输入法")
ControlClick($title2,"下一步(&N) >","Button2","left",1)

WinWait($title2,"让搜狗五笔成为您的个人专属输入法")
ControlClick($title2,"下一步(&N) >","Button2","left",1)

WinWait($title2,"启用您的网络随身输入法")
ControlClick($title2,"下一步(&N) >","Button2","left",1)

WinWait($title2,"输入法皮肤设置")
ControlClick($title2,"下一步(&N) >","Button2","left",1)

WinWait($title2,"感谢您使用搜狗五笔输入法设置向导")
ControlClick($title2,"完成(&F)","Button2","left",1)

If  ProcessExists("IEXPLORE.EXE") Then
        ProcessClose("IEXPLORE.EXE")
endif

exit
9.迅雷
#RequireAdmin
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=thunder.exe|-1
#AutoIt3Wrapper_outfile=thundersetup.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****

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

Run("thunder.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)
        
        WinWait($title,"")
        ControlClick($title,"","Button1","left",1)
        
        WinWait("迅雷7","")
        ControlClick("迅雷7","","Button2","left",1)

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

ControlClick($title,"","Button4","left",1)
ControlClick($title,"","Button5","left",1)
ControlClick($title,"","Button7","left",1)
ControlClick($title,"","Button1","left",1)


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

Exit
总结。用AU3顺序安装,网上找的“软件安装管理器”在win7下都不好用,只好这样做,主要是给装新机子用的。
#RequireAdmin
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_outfile=all.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****

Sleep(2000)

;WRAR和Flash插件
ShellExecute("wrar.exe","/s")
ShellExecute("flash.exe","/install")

;其它常用软件
FileInstall("office2003setup.exe",@ScriptDir & "" & "office2003setup.exe")
 RunWait(@ScriptDir & "" & "office2003setup.exe")
FileInstall("pinyinsetup.exe",@ScriptDir & "" & "pinyinsetup.exe") 
 RunWait(@ScriptDir & "" & "pinyinsetup.exe")
FileInstall("wubisetup.exe",@ScriptDir & "" & "wubisetup.exe")
 RunWait(@ScriptDir & "" & "wubisetup.exe")
FileInstall("qqsetup.exe",@ScriptDir & "" & "qqsetup.exe")
 RunWait(@ScriptDir & "" & "qqsetup.exe")
FileInstall("qqgamesetup.exe",@ScriptDir & "" & "qqgamesetup.exe")
RunWait(@ScriptDir & "" & "qqgamesetup.exe")
FileInstall("kuwosetup.exe",@ScriptDir & "" & "kuwosetup.exe")
RunWait(@ScriptDir & "" & "kuwosetup.exe")
FileInstall("ppstreamsetup.exe",@ScriptDir & "" & "ppstreamsetup.exe")
RunWait(@ScriptDir & "" & "ppstreamsetup.exe")
FileInstall("stormsetup.exe",@ScriptDir & "" & "stormsetup.exe")
RunWait(@ScriptDir & "" & "stormsetup.exe")
FileInstall("thundersetup.exe",@ScriptDir & "" & "thundersetup.exe")
RunWait(@ScriptDir & "" & "thundersetup.exe")

Sleep(2000)
FileDelete(@ScriptDir & "" & "*.au3")
FileDelete(@ScriptDir & "" & "*setup.exe")

Exit
发表于 2011-3-4 23:13:15 | 显示全部楼层
谢谢分享源码,学习了。。。。。
发表于 2011-3-7 22:11:35 | 显示全部楼层
带个路径
FileDelete(@ScriptDir & "\*setup.exe")
发表于 2011-3-10 00:46:49 | 显示全部楼层


看完了..........
发表于 2011-3-10 07:43:19 | 显示全部楼层
很好的教程,谢谢分享。
发表于 2011-3-10 08:22:15 | 显示全部楼层
学习了。谢谢楼主分享
 楼主| 发表于 2011-3-10 19:34:55 | 显示全部楼层
回复 3# ghl781258


    谢谢了嗯,试试好用的话就加喽.
发表于 2011-3-10 21:17:45 | 显示全部楼层
精神可嘉,欣赏就是这种精神
发表于 2011-3-10 22:14:46 | 显示全部楼层
这样挺好的。。。如果再加上一些注册表清理那就更好了!
发表于 2011-3-13 21:45:48 | 显示全部楼层
买了本《非常网管---windows脚本应用详解》
通篇是WinWaitActive,WinWaitActive,send
就是这几个命令!
晕死啊!
看了楼主的脚本!
很不错!
学习了!
本人一直在研究脚本,以及软件安装管理器!
用软件修改了‘深度的软件安装管理器’
可惜,帮助主题,资源隐藏了,怎么都修不了!只好隐藏了!
能有自己的LOGO了,希望学习autoit后,自己写一个!
发表于 2011-3-17 07:52:29 | 显示全部楼层
确实很好啊,谢谢分享啊!
发表于 2011-3-19 09:42:58 | 显示全部楼层
谢谢分享源码,学习了。。。。。
发表于 2011-3-19 18:24:55 | 显示全部楼层
安裝offiice 2003的自動安裝嗎?謝謝版大
 楼主| 发表于 2011-3-20 14:49:24 | 显示全部楼层
回复 10# xyman


    嗨 ,你好。。我也在学呢,还没你学的多。可以多多交流……
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-11-15 10:19 , Processed in 0.114072 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表