#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_Icon=D:\IconLibrary\Untitled_0000.ico
#AutoIt3Wrapper_Outfile=AI.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Comment=软件安装向导
#AutoIt3Wrapper_Res_Fileversion=0.0.0.1
#AutoIt3Wrapper_Res_FileVersion_AutoIncrement=y
#AutoIt3Wrapper_Res_LegalCopyright=全世界人民所有
#AutoIt3Wrapper_Run_Tidy=y
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
Global Const $GUI_EVENT_CLOSE = -3
Global Const $GUI_CHECKED = 1
Global Const $GUI_DOCKWIDTH = 0x0100
Global Const $GUI_DOCKHEIGHT = 0x0200
Global Const $TCCM_FIRST = 0X2000
Global Const $WS_MINIMIZEBOX = 0x00020000
Global Const $WS_SYSMENU = 0x00080000
Global Const $WS_CAPTION = 0x00C00000
Global Const $WS_POPUP = 0x80000000
Global Const $GUI_SS_DEFAULT_GUI = BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU)
$Form1_1 = GUICreate("软件安装向导", 413, 304, 224, 207)
GUISetIcon("D:\005.ico")
$PageControl1 = GUICtrlCreateTab(8, 8, 396, 256)
GUICtrlSetFont(-1, 8, 400, 0, "MS Sans Serif")
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("必备软件")
$Checkbox1 = GUICtrlCreateCheckbox("Chrome", 32, 52, 97, 17)
$Checkbox2 = GUICtrlCreateCheckbox("世界之窗", 32, 72, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox3 = GUICtrlCreateCheckbox("迅雷", 32, 92, 89, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox4 = GUICtrlCreateCheckbox("QQ2010", 32, 112, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox5 = GUICtrlCreateCheckbox("WinRAR", 32, 132, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox6 = GUICtrlCreateCheckbox("7-zip", 32, 152, 97, 17)
$Checkbox7 = GUICtrlCreateCheckbox("谷歌拼音", 32, 172, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox8 = GUICtrlCreateCheckbox("搜狗拼音", 32, 192, 97, 17)
$TabSheet2 = GUICtrlCreateTabItem("多媒体")
$Checkbox9 = GUICtrlCreateCheckbox("K-Lite Mega Codec Pack", 32, 52, 169, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox10 = GUICtrlCreateCheckbox("mplayer-ww", 32, 72, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox11 = GUICtrlCreateCheckbox("Foobar2000", 32, 92, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox12 = GUICtrlCreateCheckbox("AirPlay", 32, 112, 97, 17)
$Checkbox13 = GUICtrlCreateCheckbox("FoxitReader", 32, 132, 97, 17)
$TabSheet3 = GUICtrlCreateTabItem("安全相关")
$Checkbox14 = GUICtrlCreateCheckbox("360Safe", 32, 52, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox15 = GUICtrlCreateCheckbox("AutoRun", 32, 72, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox16 = GUICtrlCreateCheckbox("冰刃", 32, 92, 97, 17)
$Checkbox17 = GUICtrlCreateCheckbox("Wsyscheck", 32, 112, 97, 17)
$Checkbox18 = GUICtrlCreateCheckbox("AntiXES", 32, 132, 97, 17)
$TabSheet4 = GUICtrlCreateTabItem("系统优化")
$Checkbox19 = GUICtrlCreateCheckbox("雅黑字体", 32, 52, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox20 = GUICtrlCreateCheckbox("雅黑系统字体", 32, 72, 97, 17)
$Checkbox21 = GUICtrlCreateCheckbox("美化主题包", 32, 92, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox22 = GUICtrlCreateCheckbox("理顺盘符", 32, 112, 97, 17)
$Checkbox23 = GUICtrlCreateCheckbox("设置本地IP", 32, 132, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox24 = GUICtrlCreateCheckbox("创建ADSL", 32, 152, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox25 = GUICtrlCreateCheckbox("ClearType", 32, 172, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox26 = GUICtrlCreateCheckbox("优化系统", 32, 192, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$TabSheet5 = GUICtrlCreateTabItem("其他")
$Checkbox27 = GUICtrlCreateCheckbox("常用运行库", 32, 52, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
GUICtrlCreateTabItem("")
$Button1 = GUICtrlCreateButton("确定(&O)", 166, 272, 75, 25, 0)
$Button2 = GUICtrlCreateButton("取消(&C)", 246, 272, 75, 25, 0)
$Button3 = GUICtrlCreateButton("帮助(&H)", 328, 272, 75, 25, 0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$var1 = GUICtrlRead($Checkbox1)
$var2 = GUICtrlRead($Checkbox2)
$var3 = GUICtrlRead($Checkbox3)
$var4 = GUICtrlRead($Checkbox4)
$var5 = GUICtrlRead($Checkbox5)
$var6 = GUICtrlRead($Checkbox6)
$var7 = GUICtrlRead($Checkbox7)
$var8 = GUICtrlRead($Checkbox8)
$var9 = GUICtrlRead($Checkbox9)
$var10 = GUICtrlRead($Checkbox10)
$var11 = GUICtrlRead($Checkbox11)
$var12 = GUICtrlRead($Checkbox12)
$var13 = GUICtrlRead($Checkbox13)
$var14 = GUICtrlRead($Checkbox14)
$var15 = GUICtrlRead($Checkbox15)
$var16 = GUICtrlRead($Checkbox16)
$var17 = GUICtrlRead($Checkbox17)
$var18 = GUICtrlRead($Checkbox18)
$var19 = GUICtrlRead($Checkbox19)
$var20 = GUICtrlRead($Checkbox20)
$var21 = GUICtrlRead($Checkbox21)
$var22 = GUICtrlRead($Checkbox22)
$var23 = GUICtrlRead($Checkbox23)
$var24 = GUICtrlRead($Checkbox24)
$var25 = GUICtrlRead($Checkbox25)
$var26 = GUICtrlRead($Checkbox26)
$var27 = GUICtrlRead($Checkbox27)
If $var1 + $var2 + $var3 + $var4 + $var5 + $var6 + $var7 + $var8 + $var9 + $var10 + $var11 + $var12 + $var13 + $var14 + $var15 + $var16 + $var17 + $var18 + $var19 + $var20 + $var21 + $var22 + $var23 + $var24 + $var25 + $var26 + $var27 = 108 Then
MsgBox(0, "警告", "您未选择任何软件")
Else
WinSetState("软件安装向导", "", @SW_HIDE)
If $var27 = 1 Then
TrayTip("", "正在安装常用运行库", 10)
Run("8.工具\环境支持\常用运行库.exe")
WinWaitActive("常用运行库", "安装")
Send("{SPACE}")
WinWaitActive("常用运行库", "完成")
Send("{SPACE}")
EndIf
If $var1 = 1 Then
TrayTip("", "正在安装Google Chrome", 10)
Run("1.必备软件\chrome.exe")
WinWaitActive("欢迎使用谷歌浏览器", "启动谷歌浏览器")
Send("{tab}")
Send("{SPACE}")
EndIf
If $var2 = 1 Then
TrayTip("", "正在安装世界之窗", 10)
RunWait("1.必备软件\tw.exe")
EndIf
If $var3 = 1 Then
TrayTip("", "正在安装迅雷", 10)
RunWait("1.必备软件\Thunder.exe")
If FileExists("C:\WINDOWS\system32\cid_store.dat") Then
FileDelete("C:\WINDOWS\system32\cid_store.dat")
EndIf
DirCreate("C:\WINDOWS\system32\cid_store.dat")
FileSetAttrib("C:\WINDOWS\system32\cid_store.dat", "+R")
EndIf
If $var4 = 1 Then
TrayTip("", "正在安装腾讯QQ", 10)
RunWait("1.必备软件\qq.exe")
EndIf
If $var5 = 1 Then
TrayTip("", "正在安装WinRAR", 10)
Run("1.必备软件\WinRAR.exe")
WinWaitActive("WinRAR")
Send("{ENTER}")
WinWaitActive("", "全部选择")
Send("a")
Send("{ENTER}")
WinWaitActive("", "完成")
Send("{SPACE}")
WinWaitActive("C:\Documents and Settings\All Users\「开始」菜单\程序\WinRAR")
Send("!{F4}")
EndIf
If $var6 = 1 Then
TrayTip("", "正在安装7-Zip", 10)
Run("1.必备软件\7z.exe")
WinWaitActive("7-Zip", "Install")
Send("{tab}")
Send("i")
WinWaitActive("7-Zip", "Finish")
Send("f")
EndIf
If $var7 = 1 Then
TrayTip("", "正在安装谷歌拼音", 10)
Run("1.必备软件\pinyin.exe")
WinWaitActive("7-Zip", "Install")
Send("{tab}")
Send("i")
WinWaitActive("7-Zip", "Finish")
Send("f")
EndIf
If $var8 = 1 Then
TrayTip("", "正在安装搜狗拼音", 10)
Run("1.必备软件\sogou.exe")
WinWaitActive("搜狗拼音输入法", "绿化")
Send("{tab 5}")
Send("{SPACE}")
WinWaitActive("搜狗拼音输入法", "绿化完成")
Send("{SPACE}")
Send("c")
EndIf
If $var9 = 1 Then
TrayTip("", "正在安装K-lite解码包", 10)
Run("2.多媒体\K-lite.exe")
WinWaitActive("Setup - K-Lite Mega Codec Pack", "Next")
Send("n")
WinWaitActive("Setup - K-Lite Mega Codec Pack", "Select Components")
Send("{tab 2}")
Send("n")
WinWaitActive("Setup - K-Lite Mega Codec Pack", "Select Additional Tasks")
Send("n")
WinWaitActive("Setup - K-Lite Mega Codec Pack", "DXVA hardware acceleration")
Send("n")
WinWaitActive("Setup - K-Lite Mega Codec Pack", "File associations")
Send("{tab}")
Send("n")
WinWaitActive("Setup - K-Lite Mega Codec Pack", "Thumbnails")
Send("{tab 4}")
Send("n")
TrayTip("", "请自行选择您的音箱数量,10秒后使用默认设置!", 10)
WinWait("Setup - K-Lite Mega Codec Pack", "Ready to Install", 10)
If @error = 0 Then
Send("{tab}")
Send("n")
WinWait("Setup - K-Lite Mega Codec Pack", "Ready to Install")
EndIf
TrayTip("", "正在安装K-lite解码包", 10)
Send("i")
WinWait("Setup - K-Lite Mega Codec Pack", "Done")
Sleep(3000)
Send("!{F4}")
WinWaitActive("Setup - K-Lite Mega Codec Pack", "Done")
Send("f")
EndIf
If $var10 = 1 Then
TrayTip("", "正在安装mplayer-ww", 10)
Run("2.多媒体\mplayer.exe")
WinWaitActive("文件关联", "全选")
Send("{tab 4}")
Send("{SPACE}")
Send("{tab 2}")
Send("{SPACE}")
EndIf
If $var11 = 1 Then
TrayTip("", "正在安装Foobar2000", 10)
RunWait("2.多媒体\Foobar2000.exe")
EndIf
If $var12 = 1 Then
TrayTip("", "正在安装AirPlayer", 10)
FileCopy("2.多媒体\AirPlay.exe", "D:\Program Files")
EndIf
If $var13 = 1 Then
TrayTip("", "正在安装FoxitReader", 10)
Run("2.多媒体\FoxitReader.exe")
WinWaitActive("Foxit Reader", "每次打开 Foxit Reader 都进行此项检查", 3)
Send("{tab}")
Send("{SPACE}")
WinClose("Foxit Reader", "就绪")
EndIf
If $var14 = 1 Then
TrayTip("", "正在安装360安全卫士", 10)
Run("4.安全相关\防护类\360Safe.exe")
WinWaitActive("360安全卫士绿化 By落雪梨花")
Send("1")
Send("{ENTER}")
Sleep(1000)
WinClose("360安全卫士绿化")
EndIf
If $var15 = 1 Then
TrayTip("", "正在安装Autorun", 10)
Run("4.安全相关\防护类\disautos.exe")
WinWaitActive("Autorun")
Send("d")
WinClose("Autorun Vaccine")
EndIf
If $var16 = 1 Then
TrayTip("", "正在安装冰刃", 10)
FileCopy("4.安全相关\冰刃类\冰刃.exe", "D:\Program Files")
EndIf
If $var17 = 1 Then
TrayTip("", "正在安装Wsyscheck", 10)
FileCopy("4.安全相关\冰刃类\Wsyscheck.exe", "D:\Program Files")
EndIf
If $var18 = 1 Then
TrayTip("", "正在安装AntiXES", 10)
Run("4.安全相关\防护类\AntiXES.bat")
WinWaitActive("C:\WINDOWS\system32\cmd.exe")
Send("1")
Send("{ENTER}")
Sleep(3000)
Send("4")
Send("{ENTER}")
EndIf
If $var19 = 1 Then
TrayTip("", "正在安装雅黑字体", 10)
Run("3.系统设置优化\VistaFont.EXE")
WinWaitActive("Windows Vista", "请仔细阅读以下许可协议")
Send("{tab}")
Send("y")
WinWaitActive("Windows Vista", "确定")
Send("{SPACE}")
EndIf
If $var20 = 1 Then
TrayTip("", "正在安装雅黑字体为痛惜字体", 10)
RunWait("3.系统设置优化\YHfont.exe")
EndIf
If $var21 = 1 Then
TrayTip("", "正在安装美化主题包", 10)
MsgBox(0, "警告", "美化主题包已经损坏,需要重新下载!")
EndIf
If $var22 = 1 Then
TrayTip("", "正在自动理顺盘符", 10)
RunWait("3.系统设置优化\自动理顺盘符.exe")
EndIf
If $var23 = 1 Then
TrayTip("", "正在自动设置IP", 10)
RunWait("3.系统设置优化\IP.exe")
EndIf
If $var24 = 1 Then
TrayTip("", "正在创建ADSL连接", 10)
RunWait("3.系统设置优化\IP.exe")
EndIf
If $var25 = 1 Then
TrayTip("", "正在设置LCD清晰字体", 10)
ShellExecute("3.系统设置优化\cttune.cpl")
WinWaitActive("ClearType", "设置向导")
Send("w")
Send("{SPACE}")
Send("n")
WinWaitActive("ClearType")
Send("{SPACE}")
Send("n")
WinWaitActive("ClearType", "完成")
Send("{SPACE}")
EndIf
If $var26 = 1 Then
TrayTip("", "正在进行优化系统", 10)
Run("3.系统设置优化\XP优化策略.exe")
EndIf
Sleep(1000)
WinSetState("软件安装向导", "", @SW_SHOW)
SoundPlay(@WindowsDir & "\media\tada.wav", 0)
Sleep(1000)
MsgBox(0, "安装完成", "安装已经完成")
EndIf
Case $Button2
Exit
Case $Button3
MsgBox(0, "帮助", "请勾选您需要的软件并按下确定,安装时请勿操作电脑。")
EndSwitch
WEnd