无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 3282|回复: 6
打印 上一主题 下一主题

装机绿色软件自动安装到D盘系列 (附最新源代码)

  [复制链接]
跳转到指定楼层
1#
发表于 2008-2-2 17:47:32 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
其它源代码在附件喜欢的朋友自已下载吧!

软件安装管理


文件名: 软件安装管理.rar

下载链接:

http://www.fs2you.com/files/d556e419-d099-11dc-a34a-0014221f4662/


        这个程序,AU3脚本写成。是在系统部署时使用的,用来选择安装什么软件。也可以自动安装。实现部署无限的软件。自动刷新信息,支持手动安装等。请各位多提意见,褒贬皆可
以下是最新源代码

Quote:


软件安装管理
#Region ;**** 参数创建于 AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=..\..\软件安装管理.ico
#AutoIt3Wrapper_outfile=..\..\软件安装管理.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseAnsi=y
#AutoIt3Wrapper_Res_Description=软件安装管理
#AutoIt3Wrapper_Res_Fileversion=1.2.0.0
#AutoIt3Wrapper_Res_LegalCopyright=JS
#AutoIt3Wrapper_Res_SaveSource=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstants.au3>
#NoTrayIcon

;==>设定配置文件
$ExeName = StringSplit(@ScriptName, ".")
$IniName = $ExeName[1] & ".ini"
;==>检测配置文件,没有则自动生成
If FileExists($IniName) = 0 Then
    MsgBox(262160, "找不到文件", "找不到" & Chr(34) & $IniName & Chr(34) & "文件,将自动生成并退出。")
    FileInstall("软件安装管理.ini", $IniName)
    Exit
EndIf
;==>创建程序界面
GUICreate(IniRead($IniName, "总设置", "标题", "软件安装选项"), 300, 360, -1, -1)
;==>文本1
GUICtrlCreateLabel(IniRead($IniName, "总设置", "说明文字1", ""), 10, 10, 280, 48)
GUICtrlCreateGroup("", -2, 51, 999, 999) ;==>分隔符
;==>文本2
GUICtrlCreateLabel(IniRead($IniName, "总设置", "说明文字2", ""), 15, 285, 270, 35)
GUICtrlCreateGroup("", -2, 245, 999, 999) ;==>分隔符
;==>倒计时
$Progress = GUICtrlCreateProgress(10, 260, 200, 10)
$Time = IniRead($IniName, "总设置", "倒计时", "10")
$CountDown = $Time
$CountDownText = GUICtrlCreateLabel("剩余时间:" & $CountDown & "s", 220, 260, 75, 11)
;==>界面按钮
$OK = GUICtrlCreateButton("确定", 15, 320, 60, 20)
$Manual = GUICtrlCreateButton("手动安装", 85, 320, 60, 20)
$CheckAll = GUICtrlCreateButton("全选", 155, 320, 60, 20)
$CheckNone = GUICtrlCreateButton("全不选", 225, 320, 60, 20)
;==>版权信息
GUICtrlCreateLabel(IniRead($IniName, "总设置", "版权信息", "by JS"), 250, 345, 50, 30)
GUICtrlSetFont(-1, 9, 400, 2, "gulim")

;==>软件列表
GUICtrlCreateGroup("本系统集成软件", 5, 64, 290, 173)
$TreeList = GUICtrlCreateTreeView(10, 80, 280, 150, $TVS_CHECKBOXES)
$Var1 = IniRead($IniName, "总设置", "软件数量", "10") ;==>读取软件个数
Dim $CheckBox[$Var1 + 1] ;==>声明关键变量
For $Var2 = 1 To $Var1 Step 1
    $CheckBox[$Var2] = GUICtrlCreateTreeViewItem(IniRead($IniName, $Var2, "名称", ""), $TreeList) ;==>读取名称,创建列表项目
    $CheckBoxMenu = GUICtrlCreateContextMenu($CheckBox[$Var2]) ;==>建立右键菜单
    GUICtrlCreateMenuItem("版本:" & IniRead($IniName, $Var2, "版本", ""), $CheckBoxMenu)
    GUICtrlCreateMenuItem("出品:" & IniRead($IniName, $Var2, "出品", ""), $CheckBoxMenu)
    GUICtrlCreateMenuItem("大小:" & IniRead($IniName, $Var2, "大小", ""), $CheckBoxMenu)
    GUICtrlCreateMenuItem("更新:" & IniRead($IniName, $Var2, "更新", ""), $CheckBoxMenu)
    If IniRead($IniName, $Var2, "默认点选", "0") = 1 Then GUICtrlSetState($CheckBox[$Var2], $GUI_CHECKED)
Next

$CLOSE = "允许关闭" ;==>设定允许关闭
GUISetState(@SW_SHOW)
AdlibEnable("CountDown", 1000)

While 1
    $msg = GUIGetMsg()
   
    For $Var2 = 1 To $Var1 Step 1
        If $msg = $CheckBox[$Var2] Then
            If IniRead($IniName, $Var2, "强制点选", "0") <> 0 Then GUICtrlSetState($CheckBox[$Var2], $GUI_CHECKED)
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
        EndIf
    Next
   
    Select
        Case $msg = $GUI_EVENT_CLOSE ;==>关闭请求
            If $CLOSE = "允许关闭"  Then ExitLoop
        Case $msg = $CheckAll ;==>全选
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
            For $Var2 = 1 To $Var1 Step 1
                GUICtrlSetState($CheckBox[$Var2], $GUI_CHECKED)
            Next
        Case $msg = $CheckNone ;==>全不选
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
            For $Var2 = 1 To $Var1 Step 1
                GUICtrlSetState($CheckBox[$Var2], $GUI_UNCHECKED)
                If IniRead($IniName, $Var2, "强制点选", "0") <> 0 Then GUICtrlSetState($CheckBox[$Var2], $GUI_CHECKED)
            Next
        Case $msg = $OK ;==>确定
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
            ;禁止按钮
            GUICtrlSetState($OK, $GUI_DISABLE)
            GUICtrlSetState($Manual, $GUI_DISABLE)
            GUICtrlSetState($CheckAll, $GUI_DISABLE)
            GUICtrlSetState($CheckNone, $GUI_DISABLE)
            GUICtrlSetState($TreeList, $GUI_HIDE)
            $CLOSE = "禁止关闭" ;==>设定禁止关闭
            $Edit = GUICtrlCreateEdit("", 10, 80, 280, 150);==>创建状态说明窗口
            $Text = ""
            ;用"$GUI_CHECKED"会不稳定,用"1"和"257"相对保险,没有失效的情况,用CMD命令运行是为了防止找不到安装文件时程序崩溃
            For $Var2 = 1 To $Var1 Step 1
                If GUICtrlRead($CheckBox[$Var2]) = "1"  Then ;==>选择框已选时的返回值1
                    $Text = $Text & "正在安装" & IniRead($IniName, $Var2, "名称", "") & "……" & @CRLF
                    GUICtrlSetData($Edit, "")
                    GUICtrlSetData($Edit, $Text & "", $Text)
                    If IniRead($IniName, $Var2, "安装提示", "0") = 1 Then ToolTip("正在安装" & IniRead($IniName, $CheckBox, "名称", "") & "……", 0, 0, "自动安装软件", 1, 4)
                    RunWait(@ComSpec & " /c " & IniRead($IniName, $Var2, "安装包位置(自动安装)", ""), "", @SW_HIDE)
                    $Text = $Text & "  已安装" & IniRead($IniName, $Var2, "名称", "") & @CRLF
                    GUICtrlSetData($Edit, "")
                    GUICtrlSetData($Edit, $Text & "", $Text)
                ElseIf GUICtrlRead($CheckBox[$Var2]) = "257"  Then ;==>选择框已选时的返回值1
                    $Text = $Text & "正在安装" & IniRead($IniName, $Var2, "名称", "") & "……" & @CRLF
                    GUICtrlSetData($Edit, "")
                    GUICtrlSetData($Edit, $Text & "", $Text)
                    If IniRead($IniName, $Var2, "安装提示", "0") = 1 Then ToolTip("正在安装" & IniRead($IniName, $CheckBox, "名称", "") & "……", 0, 0, "自动安装软件", 1, 4)
                    RunWait(@ComSpec & " /c " & IniRead($IniName, $Var2, "安装包位置(自动安装)", ""), "", @SW_HIDE)
                    $Text = $Text & "  已安装" & IniRead($IniName, $Var2, "名称", "") & @CRLF
                    GUICtrlSetData($Edit, "")
                    GUICtrlSetData($Edit, $Text & "", $Text)
                Else
                    $Text = $Text & "不安装" & IniRead($IniName, $Var2, "名称", "") & @CRLF
                    GUICtrlSetData($Edit, "")
                    GUICtrlSetData($Edit, $Text & "", $Text)
                EndIf
            Next
            GUICtrlSetData($Edit, "")
            GUICtrlSetData($Edit, $Text & "安装完成!", $Text)
            
            Sleep(1000)
            $CLOSE = "允许关闭"
            If MsgBox(262177, "  安装完成!", "“确定”立即关闭" & Chr(13) & "“取消”手动关闭", 2) <> "2"  Then ExitLoop
            ;还原初始界面
            GUICtrlSetState($Edit, $GUI_HIDE)
            GUICtrlSetState($TreeList, $GUI_SHOW)
            GUICtrlSetState($OK, $GUI_ENABLE)
            GUICtrlSetState($Manual, $GUI_ENABLE)
            GUICtrlSetState($CheckAll, $GUI_ENABLE)
            GUICtrlSetState($CheckNone, $GUI_ENABLE)
            
        Case $msg = $Manual
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
            ;隐藏主界面,调出手工安装选择窗口,关闭之后重新显示主界面
            GUISetState(@SW_HIDE)
            FileInstall("软件手工安装.exe", "C:\Documents and Settings\All Users\Templates\")
            RunWait("C:\Documents and Settings\All Users\Templates\软件手工安装.exe " & @ScriptDir & "\" & $IniName)
            FileDelete("C:\Documents and Settings\All Users\Templates\软件手工安装.exe")
            GUISetState(@SW_SHOW)
    EndSelect
WEnd

Func CountDown()
    $CountDown = $CountDown - 1
    If $CountDown <= 0 Then ;==>倒计时为0后则当作按下"确定"按钮处理
        $msg = $OK
    EndIf
    GUICtrlSetData($Progress, ($Time - $CountDown) / $Time * 100) ;==>刷新滚动条
    GUICtrlSetData($CountDownText, "剩余时间:" & $CountDown & "s") ;==>刷新时间
EndFunc  ;==>CountDown



Quote:

软件手工安装

#Region ;**** 参数创建于 AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=..\..\软件安装管理.ico
#AutoIt3Wrapper_outfile=..\..\软件手工安装.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseAnsi=y
#AutoIt3Wrapper_Res_Description=软件安装管理-软件手工安装
#AutoIt3Wrapper_Res_Fileversion=1.2.0.0
#AutoIt3Wrapper_Res_LegalCopyright=JS
#AutoIt3Wrapper_Res_SaveSource=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstants.au3>
#NoTrayIcon

If $CmdLine[0] <> 0 Then
    $IniName = $CmdLine[1]
Else
    Exit
EndIf

GUICreate("点击安装", 150, 200, -1, -1)
$TreeList = GUICtrlCreateTreeView(0, 0, 150, 180, $TVS_LINESATROOT)
$Var1 = IniRead($IniName, "总设置", "软件数量", "10")
Dim $Label[$Var1 + 2]
For $Var2 = 1 To $Var1 Step 1
    $Label[$Var2] = GUICtrlCreateTreeViewItem(IniRead($IniName, $Var2, "名称", ""), $TreeList)
    $LabelMenu = GUICtrlCreateContextMenu($Label[$Var2])
    GUICtrlCreateMenuItem("版本:" & IniRead($IniName, $Var2, "版本", ""), $LabelMenu)
    GUICtrlCreateMenuItem("出品:" & IniRead($IniName, $Var2, "出品", ""), $LabelMenu)
    GUICtrlCreateMenuItem("大小:" & IniRead($IniName, $Var2, "大小", ""), $LabelMenu)
    GUICtrlCreateMenuItem("更新:" & IniRead($IniName, $Var2, "更新", ""), $LabelMenu)
Next

GUICtrlCreateLabel(IniRead($IniName, "总设置", "版权信息", "by JS"), 115, 185, 50, 20)
GUICtrlSetFont(-1, 9, 400, 2, "gulim")
GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg()
    For $Var2 = 1 To $Var1 Step 1
        If $msg = $Label[$Var2] Then
                RunWait(@ComSpec & " /c " & IniRead($IniName, $Var2, "安装包位置(手动安装)", ""), "", @SW_HIDE)
        EndIf
    Next
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
    EndSelect
WEnd
以下这些是使用au3脚本写的。旨在实现自动安装,但有支持手工安装。推荐在部署系统时使用。自动安装参数:/autosetup "软件安装目录(如D:\Program Files)"  ,软件安装目录默认为D:\Program Files。如 /autosetup "D:\Program Files" 也可以不加参数手工安装。

谢谢JS制作:

360safe自动安装
版本 : V4.0.2.1002 
出品 : 奇虎公司
大小 : 4.59M/20.7M
更新 : 08-01-29
安装所需时间 : 约11s
下载地址:
http://www.fs2you.com/files/520b1887-ce7d-11dc-99dd-00142218fc6e/

FoxitReader自动安装
版本 :  V1.3 0104
出品 : Foxit Software
大小 : 1.56M/2.58M
更新 : 未知
安装所需时间 : 约2s
下载地址:
http://www.fs2you.com/files/c93f2e3d-cf4b-11dc-a879-0014221f4662/

世界之窗自动安装
版本 : V2.1.1.7 Beta
出品 :  凤凰工作室
大小 : 0.87M/1.04M
更新 : 08-1-25
安装所需时间 : 约2s
下载地址:
http://www.fs2you.com/files/cdf4324c-d010-11dc-b81c-0014221f4662/

暴风影音自动安装
版本 :  V3.2 [3.08.02.01]
出品 : 暴风网际科技
大小 : 31.4M/90.5M
更新 : 08-1-28
安装所需时间 : 约51s
下载地址:
http://www.fs2you.com/files/84b925ba-cf0f-11dc-9af5-00142218fc6e/

千千静听自动安装
版本 :  V5.0.1
出品 : nanling
大小 : 2.79M/3.74M
更新 : 07-12-20
安装所需时间 : 约7s
下载地址:
http://www.fs2you.com/files/cf6fbb2e-cf15-11dc-bd02-0014221f4662/

装机软件自动安装系列源代码.rar

15.4 KB, 下载次数: 186, 下载积分: 无忧币 -2

推荐
发表于 2008-2-2 18:50:29 | 只看该作者
这个好像比较实用,下来看看。
回复

使用道具 举报

推荐
发表于 2008-2-27 11:57:52 | 只看该作者
真的很好,比我的强多了,哦要好好学习参考一下
回复

使用道具 举报

推荐
 楼主| 发表于 2008-2-2 18:14:09 | 只看该作者
软件安装管理修正版源码如上(定时更新)
回复

使用道具 举报

推荐
 楼主| 发表于 2008-2-2 17:47:53 | 只看该作者
#Region ;**** 参数创建于 AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=..\..\软件安装管理.ico
#AutoIt3Wrapper_outfile=..\..\软件安装管理.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseAnsi=y
#AutoIt3Wrapper_Res_Description=软件安装管理
#AutoIt3Wrapper_Res_Fileversion=1.2.0.0
#AutoIt3Wrapper_Res_LegalCopyright=JS
#AutoIt3Wrapper_Res_SaveSource=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstants.au3>
#NoTrayIcon

;==>设定配置文件
$ExeName = StringSplit(@ScriptName, ".")
$IniName = $ExeName[1] & ".ini"
;==>检测配置文件,没有则自动生成
If FileExists($IniName) = 0 Then
    MsgBox(262160, "找不到文件", "找不到" & Chr(34) & $IniName & Chr(34) & "文件,将自动生成并退出。")
    FileInstall("软件安装管理.ini", $IniName)
    Exit
EndIf

;==>创建程序界面
GUICreate(IniRead($IniName, "总设置", "标题", "软件安装选项"), 300, 360, -1, -1)
;==>界面文本1
GUICtrlCreateLabel(IniRead($IniName, "总设置", "说明文字1", ""), 10, 10, 280, 48)
GUICtrlCreateGroup("", -2, 51, 999, 999) ;==>分隔符
;==>界面文本2
GUICtrlCreateLabel(IniRead($IniName, "总设置", "说明文字2", ""), 15, 285, 270, 35)
GUICtrlCreateGroup("", -2, 245, 999, 999) ;==>分隔符
;==>倒计时
$Progress = GUICtrlCreateProgress(10, 260, 200, 10)
$CountDown = IniRead($IniName, "总设置", "倒计时", "10")
$CountDownText = GUICtrlCreateLabel("剩余时间:" & $CountDown & "s", 220, 260, 75, 11)
;==>界面按钮
$OK = GUICtrlCreateButton("确定", 15, 320, 60, 20)
$Manual = GUICtrlCreateButton("手动安装", 85, 320, 60, 20)
$CheckAll = GUICtrlCreateButton("全选", 155, 320, 60, 20)
$CheckNone = GUICtrlCreateButton("全不选", 225, 320, 60, 20)
;==>版权信息
GUICtrlCreateLabel(IniRead($IniName, "总设置", "版权信息", "by JS"), 250, 345, 50, 30)
GUICtrlSetFont(-1, 9, 400, 2, "gulim")

;==>软件列表
GUICtrlCreateGroup("本系统集成软件", 5, 64, 290, 173)
$TreeList = GUICtrlCreateTreeView(10, 80, 280, 150, $TVS_CHECKBOXES)

If IniRead($IniName, "选择框1", "启用", "0") = 1 Then
    $CheckBox1 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框1", "名称", ""), $TreeList)
    $CheckBox1Menu = GUICtrlCreateContextMenu($CheckBox1)
    GUICtrlCreateMenuItem("版本:" & IniRead($IniName, "选择框1", "版本", ""), $CheckBox1Menu)
    GUICtrlCreateMenuItem("出品:" & IniRead($IniName, "选择框1", "出品", ""), $CheckBox1Menu)
    GUICtrlCreateMenuItem("大小:" & IniRead($IniName, "选择框1", "大小", ""), $CheckBox1Menu)
    GUICtrlCreateMenuItem("更新:" & IniRead($IniName, "选择框1", "更新", ""), $CheckBox1Menu)
    If IniRead($IniName, "选择框1", "默认点选", "0") = 1 Then GUICtrlSetState($CheckBox1, $GUI_CHECKED)
Else
    $CheckBox1 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf

If IniRead($IniName, "选择框2", "启用", "0") = 1 Then
    $CheckBox2 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框2", "名称", ""), $TreeList)
    $CheckBox2Menu = GUICtrlCreateContextMenu($CheckBox2)
    GUICtrlCreateMenuItem("版本:" & IniRead($IniName, "选择框2", "版本", ""), $CheckBox2Menu)
    GUICtrlCreateMenuItem("出品:" & IniRead($IniName, "选择框2", "出品", ""), $CheckBox2Menu)
    GUICtrlCreateMenuItem("大小:" & IniRead($IniName, "选择框2", "大小", ""), $CheckBox2Menu)
    GUICtrlCreateMenuItem("更新:" & IniRead($IniName, "选择框2", "更新", ""), $CheckBox2Menu)
    If IniRead($IniName, "选择框2", "默认点选", "0") = 1 Then GUICtrlSetState($CheckBox2, $GUI_CHECKED)
Else
    $CheckBox2 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf

If IniRead($IniName, "选择框3", "启用", "0") = 1 Then
    $CheckBox3 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框3", "名称", ""), $TreeList)
    $CheckBox3Menu = GUICtrlCreateContextMenu($CheckBox3)
    GUICtrlCreateMenuItem("版本:" & IniRead($IniName, "选择框3", "版本", ""), $CheckBox3Menu)
    GUICtrlCreateMenuItem("出品:" & IniRead($IniName, "选择框3", "出品", ""), $CheckBox3Menu)
    GUICtrlCreateMenuItem("大小:" & IniRead($IniName, "选择框3", "大小", ""), $CheckBox3Menu)
    GUICtrlCreateMenuItem("更新:" & IniRead($IniName, "选择框3", "更新", ""), $CheckBox3Menu)
    If IniRead($IniName, "选择框3", "默认点选", "0") = 1 Then GUICtrlSetState($CheckBox3, $GUI_CHECKED)
Else
    $CheckBox3 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf

If IniRead($IniName, "选择框4", "启用", "0") = 1 Then
    $CheckBox4 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框4", "名称", ""), $TreeList)
    $CheckBox4Menu = GUICtrlCreateContextMenu($CheckBox4)
    GUICtrlCreateMenuItem("版本:" & IniRead($IniName, "选择框4", "版本", ""), $CheckBox4Menu)
    GUICtrlCreateMenuItem("出品:" & IniRead($IniName, "选择框4", "出品", ""), $CheckBox4Menu)
    GUICtrlCreateMenuItem("大小:" & IniRead($IniName, "选择框4", "大小", ""), $CheckBox4Menu)
    GUICtrlCreateMenuItem("更新:" & IniRead($IniName, "选择框4", "更新", ""), $CheckBox4Menu)
    If IniRead($IniName, "选择框4", "默认点选", "0") = 1 Then GUICtrlSetState($CheckBox4, $GUI_CHECKED)
Else
    $CheckBox4 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf

If IniRead($IniName, "选择框5", "启用", "0") = 1 Then
    $CheckBox5 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框5", "名称", ""), $TreeList)
    $CheckBox5Menu = GUICtrlCreateContextMenu($CheckBox5)
    GUICtrlCreateMenuItem("版本:" & IniRead($IniName, "选择框5", "版本", ""), $CheckBox5Menu)
    GUICtrlCreateMenuItem("出品:" & IniRead($IniName, "选择框5", "出品", ""), $CheckBox5Menu)
    GUICtrlCreateMenuItem("大小:" & IniRead($IniName, "选择框5", "大小", ""), $CheckBox5Menu)
    GUICtrlCreateMenuItem("更新:" & IniRead($IniName, "选择框5", "更新", ""), $CheckBox5Menu)
    If IniRead($IniName, "选择框5", "默认点选", "0") = 1 Then GUICtrlSetState($CheckBox5, $GUI_CHECKED)
Else
    $CheckBox5 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf

If IniRead($IniName, "选择框6", "启用", "0") = 1 Then
    $CheckBox6 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框6", "名称", ""), $TreeList)
    $CheckBox6Menu = GUICtrlCreateContextMenu($CheckBox6)
    GUICtrlCreateMenuItem("版本:" & IniRead($IniName, "选择框6", "版本", ""), $CheckBox6Menu)
    GUICtrlCreateMenuItem("出品:" & IniRead($IniName, "选择框6", "出品", ""), $CheckBox6Menu)
    GUICtrlCreateMenuItem("大小:" & IniRead($IniName, "选择框6", "大小", ""), $CheckBox6Menu)
    GUICtrlCreateMenuItem("更新:" & IniRead($IniName, "选择框6", "更新", ""), $CheckBox6Menu)
    If IniRead($IniName, "选择框6", "默认点选", "0") = 1 Then GUICtrlSetState($CheckBox6, $GUI_CHECKED)
Else
    $CheckBox6 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf

If IniRead($IniName, "选择框7", "启用", "0") = 1 Then
    $CheckBox7 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框7", "名称", ""), $TreeList)
    $CheckBox7Menu = GUICtrlCreateContextMenu($CheckBox7)
    GUICtrlCreateMenuItem("版本:" & IniRead($IniName, "选择框7", "版本", ""), $CheckBox7Menu)
    GUICtrlCreateMenuItem("出品:" & IniRead($IniName, "选择框7", "出品", ""), $CheckBox7Menu)
    GUICtrlCreateMenuItem("大小:" & IniRead($IniName, "选择框7", "大小", ""), $CheckBox7Menu)
    GUICtrlCreateMenuItem("更新:" & IniRead($IniName, "选择框7", "更新", ""), $CheckBox7Menu)
    If IniRead($IniName, "选择框7", "默认点选", "0") = 1 Then GUICtrlSetState($CheckBox7, $GUI_CHECKED)
Else
    $CheckBox7 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf

If IniRead($IniName, "选择框8", "启用", "0") = 1 Then
    $CheckBox8 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框8", "名称", ""), $TreeList)
    $CheckBox8Menu = GUICtrlCreateContextMenu($CheckBox8)
    GUICtrlCreateMenuItem("版本:" & IniRead($IniName, "选择框8", "版本", ""), $CheckBox8Menu)
    GUICtrlCreateMenuItem("出品:" & IniRead($IniName, "选择框8", "出品", ""), $CheckBox8Menu)
    GUICtrlCreateMenuItem("大小:" & IniRead($IniName, "选择框8", "大小", ""), $CheckBox8Menu)
    GUICtrlCreateMenuItem("更新:" & IniRead($IniName, "选择框8", "更新", ""), $CheckBox8Menu)
    If IniRead($IniName, "选择框8", "默认点选", "0") = 1 Then GUICtrlSetState($CheckBox8, $GUI_CHECKED)
Else
    $CheckBox8 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf

If IniRead($IniName, "选择框9", "启用", "0") = 1 Then
    $CheckBox9 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框9", "名称", ""), $TreeList)
    $CheckBox9Menu = GUICtrlCreateContextMenu($CheckBox9)
    GUICtrlCreateMenuItem("版本:" & IniRead($IniName, "选择框9", "版本", ""), $CheckBox9Menu)
    GUICtrlCreateMenuItem("出品:" & IniRead($IniName, "选择框9", "出品", ""), $CheckBox9Menu)
    GUICtrlCreateMenuItem("大小:" & IniRead($IniName, "选择框9", "大小", ""), $CheckBox9Menu)
    GUICtrlCreateMenuItem("更新:" & IniRead($IniName, "选择框9", "更新", ""), $CheckBox9Menu)
    If IniRead($IniName, "选择框9", "默认点选", "0") = 1 Then GUICtrlSetState($CheckBox9, $GUI_CHECKED)
Else
    $CheckBox9 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf

If IniRead($IniName, "选择框10", "启用", "0") = 1 Then
    $CheckBox10 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框10", "名称", ""), $TreeList)
    $CheckBox10Menu = GUICtrlCreateContextMenu($CheckBox10)
    GUICtrlCreateMenuItem("版本:" & IniRead($IniName, "选择框10", "版本", ""), $CheckBox10Menu)
    GUICtrlCreateMenuItem("出品:" & IniRead($IniName, "选择框10", "出品", ""), $CheckBox10Menu)
    GUICtrlCreateMenuItem("大小:" & IniRead($IniName, "选择框10", "大小", ""), $CheckBox10Menu)
    GUICtrlCreateMenuItem("更新:" & IniRead($IniName, "选择框10", "更新", ""), $CheckBox10Menu)
    If IniRead($IniName, "选择框10", "默认点选", "0") = 1 Then GUICtrlSetState($CheckBox10, $GUI_CHECKED)
Else
    $CheckBox10 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf

If IniRead($IniName, "选择框11", "启用", "0") = 1 Then
    $CheckBox11 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框11", "名称", ""), $TreeList)
    $CheckBox11Menu = GUICtrlCreateContextMenu($CheckBox11)
    GUICtrlCreateMenuItem("版本:" & IniRead($IniName, "选择框11", "版本", ""), $CheckBox11Menu)
    GUICtrlCreateMenuItem("出品:" & IniRead($IniName, "选择框11", "出品", ""), $CheckBox11Menu)
    GUICtrlCreateMenuItem("大小:" & IniRead($IniName, "选择框11", "大小", ""), $CheckBox11Menu)
    GUICtrlCreateMenuItem("更新:" & IniRead($IniName, "选择框11", "更新", ""), $CheckBox11Menu)
    If IniRead($IniName, "选择框11", "默认点选", "0") = 1 Then GUICtrlSetState($CheckBox11, $GUI_CHECKED)
Else
    $CheckBox11 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf

If IniRead($IniName, "选择框12", "启用", "0") = 1 Then
    $CheckBox12 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框12", "名称", ""), $TreeList)
    $CheckBox12Menu = GUICtrlCreateContextMenu($CheckBox12)
    GUICtrlCreateMenuItem("版本:" & IniRead($IniName, "选择框12", "版本", ""), $CheckBox12Menu)
    GUICtrlCreateMenuItem("出品:" & IniRead($IniName, "选择框12", "出品", ""), $CheckBox12Menu)
    GUICtrlCreateMenuItem("大小:" & IniRead($IniName, "选择框12", "大小", ""), $CheckBox12Menu)
    GUICtrlCreateMenuItem("更新:" & IniRead($IniName, "选择框12", "更新", ""), $CheckBox12Menu)
    If IniRead($IniName, "选择框12", "默认点选", "0") = 1 Then GUICtrlSetState($CheckBox12, $GUI_CHECKED)
Else
    $CheckBox12 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf

If IniRead($IniName, "选择框13", "启用", "0") = 1 Then
    $CheckBox13 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框13", "名称", ""), $TreeList)
    $CheckBox13Menu = GUICtrlCreateContextMenu($CheckBox13)
    GUICtrlCreateMenuItem("版本:" & IniRead($IniName, "选择框13", "版本", ""), $CheckBox13Menu)
    GUICtrlCreateMenuItem("出品:" & IniRead($IniName, "选择框13", "出品", ""), $CheckBox13Menu)
    GUICtrlCreateMenuItem("大小:" & IniRead($IniName, "选择框13", "大小", ""), $CheckBox13Menu)
    GUICtrlCreateMenuItem("更新:" & IniRead($IniName, "选择框13", "更新", ""), $CheckBox13Menu)
    If IniRead($IniName, "选择框13", "默认点选", "0") = 1 Then GUICtrlSetState($CheckBox13, $GUI_CHECKED)
Else
    $CheckBox13 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf

If IniRead($IniName, "选择框14", "启用", "0") = 1 Then
    $CheckBox14 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框14", "名称", ""), $TreeList)
    $CheckBox14Menu = GUICtrlCreateContextMenu($CheckBox14)
    GUICtrlCreateMenuItem("版本:" & IniRead($IniName, "选择框14", "版本", ""), $CheckBox14Menu)
    GUICtrlCreateMenuItem("出品:" & IniRead($IniName, "选择框14", "出品", ""), $CheckBox14Menu)
    GUICtrlCreateMenuItem("大小:" & IniRead($IniName, "选择框14", "大小", ""), $CheckBox14Menu)
    GUICtrlCreateMenuItem("更新:" & IniRead($IniName, "选择框14", "更新", ""), $CheckBox14Menu)
    If IniRead($IniName, "选择框14", "默认点选", "0") = 1 Then GUICtrlSetState($CheckBox14, $GUI_CHECKED)
Else
    $CheckBox14 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf

If IniRead($IniName, "选择框15", "启用", "0") = 1 Then
    $CheckBox15 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框15", "名称", ""), $TreeList)
    $CheckBox15Menu = GUICtrlCreateContextMenu($CheckBox15)
    GUICtrlCreateMenuItem("版本:" & IniRead($IniName, "选择框15", "版本", ""), $CheckBox15Menu)
    GUICtrlCreateMenuItem("出品:" & IniRead($IniName, "选择框15", "出品", ""), $CheckBox15Menu)
    GUICtrlCreateMenuItem("大小:" & IniRead($IniName, "选择框15", "大小", ""), $CheckBox15Menu)
    GUICtrlCreateMenuItem("更新:" & IniRead($IniName, "选择框15", "更新", ""), $CheckBox15Menu)
    If IniRead($IniName, "选择框15", "默认点选", "0") = 1 Then GUICtrlSetState($CheckBox15, $GUI_CHECKED)
Else
    $CheckBox15 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf

If IniRead($IniName, "选择框16", "启用", "0") = 1 Then
    $CheckBox16 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框16", "名称", ""), $TreeList)
    $CheckBox16Menu = GUICtrlCreateContextMenu($CheckBox16)
    GUICtrlCreateMenuItem("版本:" & IniRead($IniName, "选择框16", "版本", ""), $CheckBox16Menu)
    GUICtrlCreateMenuItem("出品:" & IniRead($IniName, "选择框16", "出品", ""), $CheckBox16Menu)
    GUICtrlCreateMenuItem("大小:" & IniRead($IniName, "选择框16", "大小", ""), $CheckBox16Menu)
    GUICtrlCreateMenuItem("更新:" & IniRead($IniName, "选择框16", "更新", ""), $CheckBox16Menu)
    If IniRead($IniName, "选择框16", "默认点选", "0") = 1 Then GUICtrlSetState($CheckBox16, $GUI_CHECKED)
Else
    $CheckBox16 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf

If IniRead($IniName, "选择框17", "启用", "0") = 1 Then
    $CheckBox17 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框17", "名称", ""), $TreeList)
    $CheckBox17Menu = GUICtrlCreateContextMenu($CheckBox17)
    GUICtrlCreateMenuItem("版本:" & IniRead($IniName, "选择框17", "版本", ""), $CheckBox17Menu)
    GUICtrlCreateMenuItem("出品:" & IniRead($IniName, "选择框17", "出品", ""), $CheckBox17Menu)
    GUICtrlCreateMenuItem("大小:" & IniRead($IniName, "选择框17", "大小", ""), $CheckBox17Menu)
    GUICtrlCreateMenuItem("更新:" & IniRead($IniName, "选择框17", "更新", ""), $CheckBox17Menu)
    If IniRead($IniName, "选择框17", "默认点选", "0") = 1 Then GUICtrlSetState($CheckBox17, $GUI_CHECKED)
Else
    $CheckBox17 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf

If IniRead($IniName, "选择框18", "启用", "0") = 1 Then
    $CheckBox18 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框18", "名称", ""), $TreeList)
    $CheckBox18Menu = GUICtrlCreateContextMenu($CheckBox18)
    GUICtrlCreateMenuItem("版本:" & IniRead($IniName, "选择框18", "版本", ""), $CheckBox18Menu)
    GUICtrlCreateMenuItem("出品:" & IniRead($IniName, "选择框18", "出品", ""), $CheckBox18Menu)
    GUICtrlCreateMenuItem("大小:" & IniRead($IniName, "选择框18", "大小", ""), $CheckBox18Menu)
    GUICtrlCreateMenuItem("更新:" & IniRead($IniName, "选择框18", "更新", ""), $CheckBox18Menu)
    If IniRead($IniName, "选择框18", "默认点选", "0") = 1 Then GUICtrlSetState($CheckBox18, $GUI_CHECKED)
Else
    $CheckBox18 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf

If IniRead($IniName, "选择框19", "启用", "0") = 1 Then
    $CheckBox19 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框19", "名称", ""), $TreeList)
    $CheckBox19Menu = GUICtrlCreateContextMenu($CheckBox19)
    GUICtrlCreateMenuItem("版本:" & IniRead($IniName, "选择框19", "版本", ""), $CheckBox19Menu)
    GUICtrlCreateMenuItem("出品:" & IniRead($IniName, "选择框19", "出品", ""), $CheckBox19Menu)
    GUICtrlCreateMenuItem("大小:" & IniRead($IniName, "选择框19", "大小", ""), $CheckBox19Menu)
    GUICtrlCreateMenuItem("更新:" & IniRead($IniName, "选择框19", "更新", ""), $CheckBox19Menu)
    If IniRead($IniName, "选择框19", "默认点选", "0") = 1 Then GUICtrlSetState($CheckBox19, $GUI_CHECKED)
Else
    $CheckBox19 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf

If IniRead($IniName, "选择框20", "启用", "0") = 1 Then
    $CheckBox20 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框20", "名称", ""), $TreeList)
    $CheckBox20Menu = GUICtrlCreateContextMenu($CheckBox20)
    GUICtrlCreateMenuItem("版本:" & IniRead($IniName, "选择框20", "版本", ""), $CheckBox20Menu)
    GUICtrlCreateMenuItem("出品:" & IniRead($IniName, "选择框20", "出品", ""), $CheckBox20Menu)
    GUICtrlCreateMenuItem("大小:" & IniRead($IniName, "选择框20", "大小", ""), $CheckBox20Menu)
    GUICtrlCreateMenuItem("更新:" & IniRead($IniName, "选择框20", "更新", ""), $CheckBox20Menu)
    If IniRead($IniName, "选择框20", "默认点选", "0") = 1 Then GUICtrlSetState($CheckBox20, $GUI_CHECKED)
Else
    $CheckBox20 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf

$CheckBox99 = GUICtrlCreateTreeViewItem("请选择上边的软件,谢谢使用^_^", $TreeList)
GUICtrlSetState($CheckBox99, $GUI_CHECKED)
$CLOSE = "yes"

GUISetState(@SW_SHOW)
AdlibEnable("CountDown", 1000)
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            If $CLOSE = "yes"  Then ExitLoop
        Case $msg = $CheckBox1
            If IniRead($IniName, "选择框1", "强制点选", "0") <> 1 Then GUICtrlSetState($CheckBox1, $GUI_CHECKED)
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
        Case $msg = $CheckBox2
            If IniRead($IniName, "选择框2", "强制点选", "0") <> 1 Then GUICtrlSetState($CheckBox2, $GUI_CHECKED)
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
        Case $msg = $CheckBox3
            If IniRead($IniName, "选择框3", "强制点选", "0") <> 1 Then GUICtrlSetState($CheckBox3, $GUI_CHECKED)
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
        Case $msg = $CheckBox4
            If IniRead($IniName, "选择框4", "强制点选", "0") <> 1 Then GUICtrlSetState($CheckBox4, $GUI_CHECKED)
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
        Case $msg = $CheckBox5
            If IniRead($IniName, "选择框5", "强制点选", "0") <> 1 Then GUICtrlSetState($CheckBox5, $GUI_CHECKED)
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
        Case $msg = $CheckBox6
            If IniRead($IniName, "选择框6", "强制点选", "0") <> 1 Then GUICtrlSetState($CheckBox6, $GUI_CHECKED)
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
        Case $msg = $CheckBox7
            If IniRead($IniName, "选择框7", "强制点选", "0") <> 1 Then GUICtrlSetState($CheckBox7, $GUI_CHECKED)
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
        Case $msg = $CheckBox8
            If IniRead($IniName, "选择框8", "强制点选", "0") <> 1 Then GUICtrlSetState($CheckBox8, $GUI_CHECKED)
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
        Case $msg = $CheckBox9
            If IniRead($IniName, "选择框9", "强制点选", "0") <> 1 Then GUICtrlSetState($CheckBox9, $GUI_CHECKED)
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
        Case $msg = $CheckBox10
            If IniRead($IniName, "选择框10", "强制点选", "0") <> 1 Then GUICtrlSetState($CheckBox10, $GUI_CHECKED)
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
        Case $msg = $CheckBox11
            If IniRead($IniName, "选择框11", "强制点选", "0") <> 1 Then GUICtrlSetState($CheckBox11, $GUI_CHECKED)
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
        Case $msg = $CheckBox12
            If IniRead($IniName, "选择框12", "强制点选", "0") <> 1 Then GUICtrlSetState($CheckBox12, $GUI_CHECKED)
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
        Case $msg = $CheckBox13
            If IniRead($IniName, "选择框13", "强制点选", "0") <> 1 Then GUICtrlSetState($CheckBox13, $GUI_CHECKED)
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
        Case $msg = $CheckBox14
            If IniRead($IniName, "选择框14", "强制点选", "0") <> 1 Then GUICtrlSetState($CheckBox14, $GUI_CHECKED)
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
        Case $msg = $CheckBox15
            If IniRead($IniName, "选择框15", "强制点选", "0") <> 1 Then GUICtrlSetState($CheckBox15, $GUI_CHECKED)
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
        Case $msg = $CheckBox16
            If IniRead($IniName, "选择框16", "强制点选", "0") <> 1 Then GUICtrlSetState($CheckBox16, $GUI_CHECKED)
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
        Case $msg = $CheckBox17
            If IniRead($IniName, "选择框17", "强制点选", "0") <> 1 Then GUICtrlSetState($CheckBox17, $GUI_CHECKED)
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
        Case $msg = $CheckBox18
            If IniRead($IniName, "选择框18", "强制点选", "0") <> 1 Then GUICtrlSetState($CheckBox18, $GUI_CHECKED)
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
        Case $msg = $CheckBox19
            If IniRead($IniName, "选择框19", "强制点选", "0") <> 1 Then GUICtrlSetState($CheckBox19, $GUI_CHECKED)
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
        Case $msg = $CheckBox20
            If IniRead($IniName, "选择框20", "强制点选", "0") <> 1 Then GUICtrlSetState($CheckBox20, $GUI_CHECKED)
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
        Case $msg = $CheckBox99
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
            GUICtrlSetState($CheckBox99, $GUI_CHECKED)
        Case $msg = $CheckAll
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
            GUICtrlSetState($CheckBox1, $GUI_CHECKED)
            GUICtrlSetState($CheckBox2, $GUI_CHECKED)
            GUICtrlSetState($CheckBox3, $GUI_CHECKED)
            GUICtrlSetState($CheckBox4, $GUI_CHECKED)
            GUICtrlSetState($CheckBox5, $GUI_CHECKED)
            GUICtrlSetState($CheckBox6, $GUI_CHECKED)
            GUICtrlSetState($CheckBox7, $GUI_CHECKED)
            GUICtrlSetState($CheckBox8, $GUI_CHECKED)
            GUICtrlSetState($CheckBox9, $GUI_CHECKED)
            GUICtrlSetState($CheckBox10, $GUI_CHECKED)
            GUICtrlSetState($CheckBox11, $GUI_CHECKED)
            GUICtrlSetState($CheckBox12, $GUI_CHECKED)
            GUICtrlSetState($CheckBox13, $GUI_CHECKED)
            GUICtrlSetState($CheckBox14, $GUI_CHECKED)
            GUICtrlSetState($CheckBox15, $GUI_CHECKED)
            GUICtrlSetState($CheckBox16, $GUI_CHECKED)
            GUICtrlSetState($CheckBox17, $GUI_CHECKED)
            GUICtrlSetState($CheckBox18, $GUI_CHECKED)
            GUICtrlSetState($CheckBox19, $GUI_CHECKED)
            GUICtrlSetState($CheckBox20, $GUI_CHECKED)

        Case $msg = $CheckNone
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
            GUICtrlSetState($CheckBox1, $GUI_UNCHECKED)
            GUICtrlSetState($CheckBox2, $GUI_UNCHECKED)
            GUICtrlSetState($CheckBox3, $GUI_UNCHECKED)
            GUICtrlSetState($CheckBox4, $GUI_UNCHECKED)
            GUICtrlSetState($CheckBox5, $GUI_UNCHECKED)
            GUICtrlSetState($CheckBox6, $GUI_UNCHECKED)
            GUICtrlSetState($CheckBox7, $GUI_UNCHECKED)
            GUICtrlSetState($CheckBox8, $GUI_UNCHECKED)
            GUICtrlSetState($CheckBox9, $GUI_UNCHECKED)
            GUICtrlSetState($CheckBox10, $GUI_UNCHECKED)
            GUICtrlSetState($CheckBox11, $GUI_UNCHECKED)
            GUICtrlSetState($CheckBox12, $GUI_UNCHECKED)
            GUICtrlSetState($CheckBox13, $GUI_UNCHECKED)
            GUICtrlSetState($CheckBox14, $GUI_UNCHECKED)
            GUICtrlSetState($CheckBox15, $GUI_UNCHECKED)
            GUICtrlSetState($CheckBox16, $GUI_UNCHECKED)
            GUICtrlSetState($CheckBox17, $GUI_UNCHECKED)
            GUICtrlSetState($CheckBox18, $GUI_UNCHECKED)
            GUICtrlSetState($CheckBox19, $GUI_UNCHECKED)
            GUICtrlSetState($CheckBox20, $GUI_UNCHECKED)
            
        Case $msg = $OK
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
            GUICtrlSetState($OK, $GUI_DISABLE)
            GUICtrlSetState($Manual, $GUI_DISABLE)
            GUICtrlSetState($CheckAll, $GUI_DISABLE)
            GUICtrlSetState($CheckNone, $GUI_DISABLE)
            GUICtrlSetState($TreeList, $GUI_HIDE)
            $CLOSE = "no"
            $Edit = GUICtrlCreateEdit("", 10, 80, 280, 150)
            $Text = ""
            
            If IniRead($IniName, "选择框1", "启用", "0") = 1 Then
                If GUICtrlRead($CheckBox1) = $GUI_CHECKED Then
                    $CheckBox = "选择框1"
                    setup()
                Else
                    GUICtrlSetData($Edit, $Text & "不安装" & IniRead($IniName, "选择框1", "名称", "") & @CRLF)
                EndIf
            EndIf
            
            If IniRead($IniName, "选择框2", "启用", "0") = 1 Then
                If GUICtrlRead($CheckBox2) = $GUI_CHECKED Then
                    $CheckBox = "选择框2"
                    setup()
                Else
                    GUICtrlSetData($Edit, $Text & "不安装" & IniRead($IniName, "选择框2", "名称", "") & @CRLF)
                EndIf
            EndIf
            
            If IniRead($IniName, "选择框3", "启用", "0") = 1 Then
                If GUICtrlRead($CheckBox3) = $GUI_CHECKED Then
                    $CheckBox = "选择框3"
                    setup()
                Else
                    GUICtrlSetData($Edit, $Text & "不安装" & IniRead($IniName, "选择框3", "名称", "") & @CRLF)
                EndIf
            EndIf
            
            If IniRead($IniName, "选择框4", "启用", "0") = 1 Then
                If GUICtrlRead($CheckBox4) = $GUI_CHECKED Then
                    $CheckBox = "选择框4"
                    setup()
                Else
                    GUICtrlSetData($Edit, $Text & "不安装" & IniRead($IniName, "选择框4", "名称", "") & @CRLF)
                EndIf
            EndIf
            
            If IniRead($IniName, "选择框5", "启用", "0") = 1 Then
                If GUICtrlRead($CheckBox5) = $GUI_CHECKED Then
                    $CheckBox = "选择框5"
                    setup()
                Else
                    GUICtrlSetData($Edit, $Text & "不安装" & IniRead($IniName, "选择框5", "名称", "") & @CRLF)
                EndIf
            EndIf
            
            If IniRead($IniName, "选择框6", "启用", "0") = 1 Then
                If GUICtrlRead($CheckBox6) = $GUI_CHECKED Then
                    $CheckBox = "选择框6"
                    setup()
                Else
                    GUICtrlSetData($Edit, $Text & "不安装" & IniRead($IniName, "选择框6", "名称", "") & @CRLF)
                EndIf
            EndIf
            
            If IniRead($IniName, "选择框7", "启用", "0") = 1 Then
                If GUICtrlRead($CheckBox7) = $GUI_CHECKED Then
                    $CheckBox = "选择框7"
                    setup()
                Else
                    GUICtrlSetData($Edit, $Text & "不安装" & IniRead($IniName, "选择框7", "名称", "") & @CRLF)
                EndIf
            EndIf
            
            If IniRead($IniName, "选择框8", "启用", "0") = 1 Then
                If GUICtrlRead($CheckBox8) = $GUI_CHECKED Then
                    $CheckBox = "选择框8"
                    setup()
                Else
                    GUICtrlSetData($Edit, $Text & "不安装" & IniRead($IniName, "选择框8", "名称", "") & @CRLF)
                EndIf
            EndIf
            
            If IniRead($IniName, "选择框9", "启用", "0") = 1 Then
                If GUICtrlRead($CheckBox9) = $GUI_CHECKED Then
                    $CheckBox = "选择框9"
                    setup()
                Else
                    GUICtrlSetData($Edit, $Text & "不安装" & IniRead($IniName, "选择框9", "名称", "") & @CRLF)
                EndIf
            EndIf
            
            If IniRead($IniName, "选择框10", "启用", "0") = 1 Then
                If GUICtrlRead($CheckBox10) = $GUI_CHECKED Then
                    $CheckBox = "选择框10"
                    setup()
                Else
                    GUICtrlSetData($Edit, $Text & "不安装" & IniRead($IniName, "选择框10", "名称", "") & @CRLF)
                EndIf
            EndIf
            
            If IniRead($IniName, "选择框11", "启用", "0") = 1 Then
                If GUICtrlRead($CheckBox11) = $GUI_CHECKED Then
                    $CheckBox = "选择框11"
                    setup()
                Else
                    GUICtrlSetData($Edit, $Text & "不安装" & IniRead($IniName, "选择框11", "名称", "") & @CRLF)
                EndIf
            EndIf
            
            If IniRead($IniName, "选择框12", "启用", "0") = 1 Then
                If GUICtrlRead($CheckBox12) = $GUI_CHECKED Then
                    $CheckBox = "选择框12"
                    setup()
                Else
                    GUICtrlSetData($Edit, $Text & "不安装" & IniRead($IniName, "选择框12", "名称", "") & @CRLF)
                EndIf
            EndIf
            
            If IniRead($IniName, "选择框13", "启用", "0") = 1 Then
                If GUICtrlRead($CheckBox13) = $GUI_CHECKED Then
                    $CheckBox = "选择框13"
                    setup()
                Else
                    GUICtrlSetData($Edit, $Text & "不安装" & IniRead($IniName, "选择框13", "名称", "") & @CRLF)
                EndIf
            EndIf
            
            If IniRead($IniName, "选择框14", "启用", "0") = 1 Then
                If GUICtrlRead($CheckBox14) = $GUI_CHECKED Then
                    $CheckBox = "选择框14"
                    setup()
                Else
                    GUICtrlSetData($Edit, $Text & "不安装" & IniRead($IniName, "选择框14", "名称", "") & @CRLF)
                EndIf
            EndIf
            
            If IniRead($IniName, "选择框15", "启用", "0") = 1 Then
                If GUICtrlRead($CheckBox15) = $GUI_CHECKED Then
                    $CheckBox = "选择框15"
                    setup()
                Else
                    GUICtrlSetData($Edit, $Text & "不安装" & IniRead($IniName, "选择框15", "名称", "") & @CRLF)
                EndIf
            EndIf
            
            If IniRead($IniName, "选择框16", "启用", "0") = 1 Then
                If GUICtrlRead($CheckBox16) = $GUI_CHECKED Then
                    $CheckBox = "选择框16"
                    setup()
                Else
                    GUICtrlSetData($Edit, $Text & "不安装" & IniRead($IniName, "选择框16", "名称", "") & @CRLF)
                EndIf
            EndIf
            
            If IniRead($IniName, "选择框17", "启用", "0") = 1 Then
                If GUICtrlRead($CheckBox17) = $GUI_CHECKED Then
                    $CheckBox = "选择框17"
                    setup()
                Else
                    GUICtrlSetData($Edit, $Text & "不安装" & IniRead($IniName, "选择框17", "名称", "") & @CRLF)
                EndIf
            EndIf
            
            If IniRead($IniName, "选择框18", "启用", "0") = 1 Then
                If GUICtrlRead($CheckBox18) = $GUI_CHECKED Then
                    $CheckBox = "选择框18"
                    setup()
                Else
                    GUICtrlSetData($Edit, $Text & "不安装" & IniRead($IniName, "选择框18", "名称", "") & @CRLF)
                EndIf
            EndIf
            
            If IniRead($IniName, "选择框19", "启用", "0") = 1 Then
                If GUICtrlRead($CheckBox19) = $GUI_CHECKED Then
                    $CheckBox = "选择框19"
                    setup()
                Else
                    GUICtrlSetData($Edit, $Text & "不安装" & IniRead($IniName, "选择框19", "名称", "") & @CRLF)
                EndIf
            EndIf
            
            If IniRead($IniName, "选择框20", "启用", "0") = 1 Then
                If GUICtrlRead($CheckBox20) = $GUI_CHECKED Then
                    $CheckBox = "选择框20"
                    setup()
                Else
                    GUICtrlSetData($Edit, $Text & "不安装" & IniRead($IniName, "选择框20", "名称", "") & @CRLF)
                EndIf
            EndIf
            
            GUICtrlSetData($Edit, $Text & "安装完成!", $Text)
            Sleep(1000)
            GUICtrlSetState($Edit, $GUI_HIDE)
            GUICtrlSetState($TreeList, $GUI_SHOW)
        Case $msg = $Manual
            ControlHide("软件安装选项", "", $CountDownText)
            AdlibDisable()
            GUISetState(@SW_HIDE)
            FileInstall("软件手工安装.exe", "C:\Documents and Settings\All Users\Templates\")
            RunWait("C:\Documents and Settings\All Users\Templates\软件手工安装.exe " & $IniName)
            GUISetState(@SW_SHOW)
    EndSelect
WEnd

Func CountDown()
    If $CountDown <= 0 Then
        $msg = $OK
    EndIf
    GUICtrlSetData($Progress, Int((11 - $CountDown) * 10))
    GUICtrlSetData($CountDownText, "剩余时间:" & $CountDown & "s")
    $CountDown = $CountDown - 1
EndFunc  ;==>CountDown

Func setup()
    $a = ""
    GUICtrlSetData($Edit, $Text & "正在安装" & IniRead($IniName, $CheckBox, "名称", "") & "……" & $a & @CRLF, $a)
    If IniRead($IniName, $CheckBox, "安装包位置(自动安装)", "") <> "" Then
        If FileExists(IniRead($IniName, $CheckBox, "安装包位置(自动安装)", "")) Then
            If IniRead($IniName, $CheckBox, "安装提示", "0") = 1 Then ToolTip("正在安装" & IniRead($IniName, $CheckBox, "名称", "") & "……", 0, 0, "自动安装软件", 1, 4)
            RunWait(IniRead($IniName, $CheckBox, "安装包位置(自动安装)", ""), "")
        Else
            MsgBox(8208, "错误", "找不到" & IniRead($IniName, $CheckBox, "名称", "") & ",2秒后自动关闭", 2)
        EndIf
    EndIf
    $Text = $Text & "  已安装" & IniRead($IniName, $CheckBox, "名称", "") & @CRLF
    GUICtrlSetData($Edit, $Text)
EndFunc  ;==>setup



手工安装



#Region ;**** 参数创建于 AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=..\..\软件安装管理.ico
#AutoIt3Wrapper_outfile=..\..\软件手工安装.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseAnsi=y
#AutoIt3Wrapper_Res_Description=软件安装管理-软件手工安装
#AutoIt3Wrapper_Res_Fileversion=1.2.0.0
#AutoIt3Wrapper_Res_LegalCopyright=JS
#AutoIt3Wrapper_Res_SaveSource=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstants.au3>
#NoTrayIcon

If $CmdLine[0] <> 0 Then
    $IniName = $CmdLine[1]
Else
    Exit
EndIf
GUICreate("", 150, 200, -1, -1)
$TreeList = GUICtrlCreateTreeView(0, 0, 150, 180, $TVS_LINESATROOT)
If IniRead($IniName, "选择框1", "启用", "0") = 1 Then
    $CheckBox1 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框1", "名称", ""), $TreeList)
Else
    $CheckBox1 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf
If IniRead($IniName, "选择框2", "启用", "0") = 1 Then
    $CheckBox2 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框2", "名称", ""), $TreeList)
Else
    $CheckBox2 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf
If IniRead($IniName, "选择框3", "启用", "0") = 1 Then
    $CheckBox3 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框3", "名称", ""), $TreeList)
Else
    $CheckBox3 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf
If IniRead($IniName, "选择框4", "启用", "0") = 1 Then
    $CheckBox4 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框4", "名称", ""), $TreeList)
Else
    $CheckBox4 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf
If IniRead($IniName, "选择框5", "启用", "0") = 1 Then
    $CheckBox5 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框5", "名称", ""), $TreeList)
Else
    $CheckBox5 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf
If IniRead($IniName, "选择框6", "启用", "0") = 1 Then
    $CheckBox6 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框6", "名称", ""), $TreeList)
Else
    $CheckBox6 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf
If IniRead($IniName, "选择框7", "启用", "0") = 1 Then
    $CheckBox7 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框7", "名称", ""), $TreeList)
Else
    $CheckBox7 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf
If IniRead($IniName, "选择框8", "启用", "0") = 1 Then
    $CheckBox8 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框8", "名称", ""), $TreeList)
Else
    $CheckBox8 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf
If IniRead($IniName, "选择框9", "启用", "0") = 1 Then
    $CheckBox9 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框9", "名称", ""), $TreeList)
Else
    $CheckBox9 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf
If IniRead($IniName, "选择框10", "启用", "0") = 1 Then
    $CheckBox10 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框10", "名称", ""), $TreeList)
Else
    $CheckBox10 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf
If IniRead($IniName, "选择框11", "启用", "0") = 1 Then
    $CheckBox11 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框11", "名称", ""), $TreeList)
Else
    $CheckBox11 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf
If IniRead($IniName, "选择框12", "启用", "0") = 1 Then
    $CheckBox12 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框12", "名称", ""), $TreeList)
Else
    $CheckBox12 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf
If IniRead($IniName, "选择框13", "启用", "0") = 1 Then
    $CheckBox13 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框13", "名称", ""), $TreeList)
Else
    $CheckBox13 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf
If IniRead($IniName, "选择框14", "启用", "0") = 1 Then
    $CheckBox14 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框14", "名称", ""), $TreeList)
Else
    $CheckBox14 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf
If IniRead($IniName, "选择框15", "启用", "0") = 1 Then
    $CheckBox15 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框15", "名称", ""), $TreeList)
Else
    $CheckBox15 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf
If IniRead($IniName, "选择框16", "启用", "0") = 1 Then
    $CheckBox16 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框16", "名称", ""), $TreeList)
Else
    $CheckBox16 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf
If IniRead($IniName, "选择框17", "启用", "0") = 1 Then
    $CheckBox17 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框17", "名称", ""), $TreeList)
Else
    $CheckBox17 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf
If IniRead($IniName, "选择框18", "启用", "0") = 1 Then
    $CheckBox18 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框18", "名称", ""), $TreeList)
Else
    $CheckBox18 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf
If IniRead($IniName, "选择框19", "启用", "0") = 1 Then
    $CheckBox19 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框19", "名称", ""), $TreeList)
Else
    $CheckBox19 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf
If IniRead($IniName, "选择框20", "启用", "0") = 1 Then
    $CheckBox20 = GUICtrlCreateTreeViewItem(IniRead($IniName, "选择框10", "名称", ""), $TreeList)
Else
    $CheckBox20 = GUICtrlCreateLabel("", 999, 999, 1, 1)
EndIf
GUICtrlCreateLabel(IniRead($IniName, "总设置", "版权信息", "by JS"), 115, 185, 50, 20)
GUICtrlSetFont(-1, 9, 400, 2, "gulim")
GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $CheckBox1
            $CheckBox = "选择框1"
            setup()
        Case $msg = $CheckBox2
            $CheckBox = "选择框2"
            setup()
        Case $msg = $CheckBox3
            $CheckBox = "选择框3"
            setup()
        Case $msg = $CheckBox4
            $CheckBox = "选择框4"
            setup()
        Case $msg = $CheckBox5
            $CheckBox = "选择框5"
            setup()
        Case $msg = $CheckBox6
            $CheckBox = "选择框6"
            setup()
        Case $msg = $CheckBox7
            $CheckBox = "选择框7"
            setup()
        Case $msg = $CheckBox8
            $CheckBox = "选择框8"
            setup()
        Case $msg = $CheckBox9
            $CheckBox = "选择框9"
            setup()
        Case $msg = $CheckBox10
            $CheckBox = "选择框10"
            setup()
        Case $msg = $CheckBox11
            $CheckBox = "选择框11"
            setup()
        Case $msg = $CheckBox12
            $CheckBox = "选择框12"
            setup()
        Case $msg = $CheckBox13
            $CheckBox = "选择框13"
            setup()
        Case $msg = $CheckBox14
            $CheckBox = "选择框14"
            setup()
        Case $msg = $CheckBox15
            $CheckBox = "选择框15"
            setup()
        Case $msg = $CheckBox16
            $CheckBox = "选择框16"
            setup()
        Case $msg = $CheckBox17
            $CheckBox = "选择框17"
            setup()
        Case $msg = $CheckBox18
            $CheckBox = "选择框18"
            setup()
        Case $msg = $CheckBox19
            $CheckBox = "选择框19"
            setup()
        Case $msg = $CheckBox20
            $CheckBox = "选择框20"
            setup()
    EndSelect
WEnd

Func setup()
    If FileExists(IniRead($IniName, $CheckBox, "安装包位置(手动安装)", "")) Then
        RunWait(IniRead($IniName, $CheckBox, "安装包位置(手动安装)", ""), "")
    Else
        MsgBox(8208, "错误", "找不到" & IniRead($IniName, $CheckBox, "名称", "") & ",2秒后自动关闭", 2)
    EndIf
EndFunc  ;==>setup
回复

使用道具 举报

6#
发表于 2008-2-28 11:07:51 | 只看该作者
呵呵,还有源码哦,要支持下
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2025-12-23 02:21

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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