由于硬盘损坏,源码丢失,高手能帮忙反编译下吗?
本帖最后由 chenmaochun 于 2017-6-27 09:04 编辑我曾经在论坛发过一个求助帖子,链接如下:http://www.autoitx.com/thread-55034-1-1.html
不过没人回复,后来我自己解决了这个问题,也写出了相关程序,经过几个月的完善,程序已经比较完善,可惜的是,前几天固态硬盘无声无息的挂掉了,源码全部丢失,现在只有编译好的程序在u盘里面,不知道各位大大能不能帮忙反编译出源码,这程序重新写的话,很累人的,谢谢各位大大了。
下面是程序是我写的证据:
里面有一些自定义函数:MountImage(),fqxx(),ghoaz(),qdaz(),等等,全凭记忆,不一定十分准确,但是有前面求助帖子里面的相关代码,由于更新了很多版本,有些代码已经改写,但是button5和button7这两个按钮是没变的。
程序使用IT天空版本的au3编写,au3版本为3.3.14.2。编译时使用了简单防反,不知道这样还能不能反编译,各位大大帮帮忙吧。由于程序比较大,论坛附件没法上传,传到百度网盘了,下载地址:
链接: http://pan.baidu.com/s/1kURjANd 密码: dfrn _singleton("test")
_winapi_wow64enablewow64fsredirection(False)
Opt("GUICloseOnESC", 0)
Opt("TrayMenuMode", 1)
Opt("trayOnEventMode", 1)
$aboutitem = TrayCreateItem("关于")
TrayItemSetOnEvent($aboutitem, "TrayMsg")
$exititem = TrayCreateItem("退出")
TrayItemSetOnEvent($exititem, "TrayMsg")
TraySetState()
OnAutoItExitRegister("_OnExit")
Global $title = "南充理想电脑系统安装程序"
Local $str
Global Const $gc_tempdir = _createtempdir(@TempDir & "\~SwInsqt.Tmp")
Global $drive = DriveGetDrive("FIXED")
SplashTextOn("", "正在获取分区信息、搜索镜像文件󓏷稍后...", 480, 60, -1, -1, 33)
_dism()
If FileExists("ncideal.ini") = 1 Then
Global $winxp = IniRead("ncideal.ini", "winxp", "drive", "")
Global $win7x86 = IniRead("ncideal.ini", "win7x86", "drive", "")
Global $win7x64 = IniRead("ncideal.ini", "win7x64", "drive", "")
Global $win10x86 = IniRead("ncideal.ini", "win10x86", "drive", "")
Global $win10x64 = IniRead("ncideal.ini", "win10x64", "drive", "")
Else
$winxp = "SkyIAR_v2.exe"
$win7x86 = "EasyDrv7(Win7.x86).exe"
$win7x64 = "EasyDrv7(Win7.x64).exe"
$win10x86 = "EasyDrv7(Win10.x86).exe"
$win10x64 = "EasyDrv7(Win10.x64).exe"
EndIf
Global $dsptw = $gc_tempdir & "\dsptw.exe", $nt6 = $gc_tempdir & "\wimlib\nt6.ini", $yxcs
If @OSArch = "X64" Then $bcdboot = $gc_tempdir & "\BCDBoot\X64\bcdboot.exe"
If @OSArch = "X86" Then $bcdboot = $gc_tempdir & "\BCDBoot\X86\bcdboot.exe"
If @OSArch = "X64" Then $bootsect = $gc_tempdir & "\BCDBoot\X64\bootsect.exe"
If @OSArch = "X86" Then $bootsect = $gc_tempdir & "\BCDBoot\X86\bootsect.exe"
If @OSArch = "X64" Then $ghost = $gc_tempdir & "\ghost\ghost64.exe"
If @OSArch = "X86" Then $ghost = $gc_tempdir & "\ghost\ghost32.exe"
If @OSArch = "X64" Then $winwimlib = $gc_tempdir & "\wimlib\X64\wimlib-imagex.exe"
If @OSArch = "X86" Then $winwimlib = $gc_tempdir & "\wimlib\X86\wimlib-imagex.exe"
Global $wimaz, $azjdxx, $tl, $progressform, $label14, $wimbf, $bfjdxx, $bfys, $t2
_skins()
$mem = MemGetStats()
$mem1 = Round($mem / 1048576)
$form1 = GUICreate($title, 480, 457, -1, -1)
$menuitem1 = GUICtrlCreateMenu("菜单")
$menuitem10 = GUICtrlCreateMenuItem("SKYIAR驱动注入", $menuitem1)
$menuitem7 = GUICtrlCreateMenuItem("万能驱动win7x86", $menuitem1)
$menuitem8 = GUICtrlCreateMenuItem("万能驱动win7x64", $menuitem1)
$menuitem4 = GUICtrlCreateMenuItem("万能驱动win10x86", $menuitem1)
$menuitem5 = GUICtrlCreateMenuItem("万能驱动win10x64", $menuitem1)
$menuitem6 = GUICtrlCreateMenuItem("退出", $menuitem1)
$menuitem2 = GUICtrlCreateMenu("关于")
$menuitem3 = GUICtrlCreateMenuItem("关于", $menuitem2)
$diskgroup = GUICtrlCreateGroup("请选择系统安装或备份分区", 5, 5, 470, 130)
Global $disklist = _guictrllistview_create($form1, "", 15, 20, 450, 106)
_guictrllistview_setextendedlistviewstyle($disklist, BitOR($lvs_ex_gridlines, $lvs_ex_fullrowselect, $lvs_ex_subitemimages))
_guictrllistview_insertcolumn($disklist, 0, "编号", 40, 2)
_guictrllistview_insertcolumn($disklist, 1, "盘符", 40, 2)
_guictrllistview_insertcolumn($disklist, 2, "总共空间", 60, 2)
_guictrllistview_insertcolumn($disklist, 3, "剩余空间", 60, 2)
_guictrllistview_insertcolumn($disklist, 4, "分区类型", 60, 2)
_guictrllistview_insertcolumn($disklist, 5, "分区格式", 60, 2)
_guictrllistview_insertcolumn($disklist, 6, " ", 0, 2)
_guictrllistview_insertcolumn($disklist, 7, "引导类型", 60, 2)
_guictrllistview_insertcolumn($disklist, 8, "激活", 50, 2)
$mytab = GUICtrlCreateTab(1, 135, 477, 300)
$tabsheet2 = GUICtrlCreateTabItem("系统安装")
If $mem1 > 3 Then
$group3 = GUICtrlCreateGroup("本机内存󖠢 & $mem1 & "GB,建议安装WIN7X64或者WIN10x64", 6, 165, 461, 265)
Else
$group3 = GUICtrlCreateGroup("本机内存󖠢 & $mem1 & "GB,建议安装WINXP或者WIN7X86", 6, 165, 461, 265)
EndIf
$label6 = GUICtrlCreateLabel("安装盘符:", 13, 193, 55, 17)
$combo3 = GUICtrlCreateCombo("", 75, 190, 40, 25)
GUICtrlSetState(-1, $gui_disable)
$checkbox4 = GUICtrlCreateCheckbox("手动选择安装盘符", 120, 190, 115, 17)
GUICtrlSetState(-1, "")
$checkbox3 = GUICtrlCreateCheckbox("自动格式化", 240, 190, 80, 17)
GUICtrlSetState(-1, $gui_checked)
$label8 = GUICtrlCreateLabel("引导盘符:", 13, 218, 55, 17)
$combo4 = GUICtrlCreateCombo("", 75, 215, 40, 25)
GUICtrlSetState(-1, $gui_disable)
$checkbox5 = GUICtrlCreateCheckbox("自动格式化", 240, 215, 80, 17)
GUICtrlSetState(-1, $gui_checked)
$checkbox1 = GUICtrlCreateCheckbox("手动选择引导盘符", 120, 215, 115, 17)
GUICtrlSetState(-1, "")
$label5 = GUICtrlCreateLabel("镜像列表:", 13, 243, 55, 17)
$combo6 = GUICtrlCreateCombo("", 75, 240, 250, 25)
GUICtrlSetData(-1, "")
$button5 = GUICtrlCreateButton("浏览", 330, 238, 49, 25)
$label7 = GUICtrlCreateLabel("镜像卷号:", 14, 270, 55, 17)
$wimindex = GUICtrlCreateCombo("", 75, 267, 40, 25)
$label9 = GUICtrlCreateLabel("您选择了GHO文件󓅜像卷号无效", 120, 270, 200, 17)
GUICtrlSetState($label9, $gui_hide)
$label12 = GUICtrlCreateLabel("镜像信息:", 13, 300, 55, 17)
$wimname = GUICtrlCreateList("", 75, 298, 340, 25)
GUICtrlSetData(-1, "")
$checkbox6 = GUICtrlCreateCheckbox("安装完成后使用万能驱动导入驱动", 13, 330, 200, 17)
GUICtrlSetState(-1, $gui_checked)
$checkbox7 = GUICtrlCreateCheckbox("安装完成后自动重启", 13, 350, 137, 17)
GUICtrlSetState(-1, $gui_checked)
$checkbox8 = GUICtrlCreateCheckbox("删除万能驱动添加的推广软件", 213, 330, 207, 17)
GUICtrlSetState(-1, "")
$button7 = GUICtrlCreateButton("开始安装", 360, 370, 80, 30)
$tabsheet1 = GUICtrlCreateTabItem("系统备份")
$group4 = GUICtrlCreateGroup("", 6, 159, 461, 270)
$label1 = GUICtrlCreateLabel("备份盘符:", 14, 183, 55, 17)
$combo5 = GUICtrlCreateCombo("", 75, 180, 40, 25)
GUICtrlSetState(-1, $gui_disable)
$checkbox2 = GUICtrlCreateCheckbox("使用NT6精简列表󒁎T5系统不要勾选󒐢, 130, 180, 220, 17)
GUICtrlSetState(-1, $gui_checked)
$label2 = GUICtrlCreateLabel("保存目录:", 14, 223, 55, 17)
$input2 = GUICtrlCreateInput("", 75, 220, 267, 20)
$button2 = GUICtrlCreateButton("浏览", 348, 218, 49, 25)
$label3 = GUICtrlCreateLabel("镜像名称:", 14, 258, 150, 17)
$input3 = GUICtrlCreateInput("", 75, 255, 330, 20)
$label4 = GUICtrlCreateLabel("压缩比率:", 14, 297, 55, 17)
$combo1 = GUICtrlCreateCombo("", 75, 294, 126, 25)
GUICtrlSetData(-1, "极限压缩|最大压缩|快速压缩", "极限压缩")
$button3 = GUICtrlCreateButton("新建镜像", 280, 370, 80, 30)
$button4 = GUICtrlCreateButton("追加镜像", 365, 370, 80, 30)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
_fqlb()
_fqxx()
_imagelist()
AdlibRegister("listsx", 100)
SplashOff()
Local $adrive = DriveGetDrive("REMOVABLE")
While 1
$nmsg = GUIGetMsg()
Switch $nmsg
Case $gui_event_close, $menuitem6
Exit
Case $menuitem3
MsgBox(0 + 64, $title, "本程序用于便捷的安装操作系统", 0, $form1)
Case $menuitem4
If $adrive = @error Then
MsgBox(0 + 64, $title, "请插入带有万能驱动包的优盘", 0, $form1)
Else
If FileExists("ncideal.ini") = 1 Then
$yxcs = IniRead("ncideal.ini", "win10x86", "yxcs", "")
Else
$yxcs = " /a"
EndIf
For $i = 1 To $adrive
finddrive($adrive[$i], $win10x86)
Next
EndIf
Case $menuitem5
If $adrive = @error Then
MsgBox(0 + 64, $title, "请插入带有万能驱动包的优盘", 0, $form1)
Else
If FileExists("ncideal.ini") = 1 Then
$yxcs = IniRead("ncideal.ini", "win10x64", "yxcs", "")
Else
$yxcs = " /a"
EndIf
For $i = 1 To $adrive
finddrive($adrive[$i], $win10x64)
Next
EndIf
Case $menuitem7
If $adrive = @error Then
MsgBox(0 + 64, $title, "请插入带有万能驱动包的优盘", 0, $form1)
Else
If FileExists("ncideal.ini") = 1 Then
$yxcs = IniRead("ncideal.ini", "win7x86", "yxcs", "")
Else
$yxcs = " /a"
EndIf
For $i = 1 To $adrive
finddrive($adrive[$i], $win7x86)
Next
EndIf
Case $menuitem8
If $adrive = @error Then
MsgBox(0 + 64, $title, "请插入带有万能驱动包的优盘", 0, $form1)
Else
If FileExists("ncideal.ini") = 1 Then
$yxcs = IniRead("ncideal.ini", "win7x64", "yxcs", "")
Else
$yxcs = " /a"
EndIf
For $i = 1 To $adrive
finddrive($adrive[$i], $win7x64)
Next
EndIf
Case $menuitem10
If $adrive = @error Then
MsgBox(0 + 64, $title, "请插入带有SKYIAR的优盘", 0, $form1)
Else
If FileExists("ncideal.ini") = 1 Then
$yxcs = IniRead("ncideal.ini", "winxp", "yxcs", "")
Else
$yxcs = " /Auto /TimeOut:3"
EndIf
For $i = 1 To $adrive
finddrive($adrive[$i], $winxp)
Next
EndIf
Case $checkbox8
If GUICtrlRead($checkbox8) = 1 Then
GUICtrlSetState($checkbox6, $gui_checked)
EndIf
Case $checkbox6
If GUICtrlRead($checkbox8) = 1 Then
GUICtrlSetState($checkbox6, $gui_checked)
EndIf
Case $button2
$file = FileSaveDialog($title, "", "系统镜像(*.wim;*.esd;*.gho)", "", "", $form1)
If $file Then GUICtrlSetData($input2, $file)
If StringRight($file, 4) = ".gho" Then
GUICtrlSetData($input3, "GHO文件󓇠需输入镜像名称󓇠法使用NT6精简列表")
GUICtrlSetState($input3, $gui_disable)
GUICtrlSetState($checkbox2, $gui_unchecked)
GUICtrlSetState($checkbox2, $gui_disable)
Else
GUICtrlSetState($checkbox2, $gui_enable)
GUICtrlSetState($checkbox2, $gui_checked)
GUICtrlSetState($input3, $gui_enable)
GUICtrlSetData($input3, "")
EndIf
Case $button3
Dim $timer = TimerInit()
AdlibRegister("Timerbf", 50)
$file = GUICtrlRead($input2)
If StringRight($file, 4) = ".wim" Then
GUISetState(@SW_HIDE, $form1)
_bfprogressform()
Local $foo, $line
$foo = Run(@ComSpec & " /C " & "@echo off &" & $winwimlib & ' capture "' & GUICtrlRead($combo5) & '" "' & GUICtrlRead($input2) & '" "' & GUICtrlRead($input3) & '" ' & wimlibcompress(GUICtrlRead($combo1)), "", @SW_HIDE, $stdout_child)
While 1
$line = StdoutRead($foo)
If @error Then ExitLoop
If StringStripWS($line, 8) <> "" Then
Local $txtread = StringStripCR($line)
If StringInStr($txtread, "scanned") Then
$progressa = StringSplit($txtread, ")")
$progressb = StringSplit($progressa, "(")
$progress = StringStripCR(StringStripWS($progressb, 8))
$progress = StringReplace($progress, "files,", "文件󓀢)
$progress = StringReplace($progress, "directories", "目录")
ControlSetText($title, "", $wimbf, "正在扫描文件和目录󓇲完成 " & $progress)
ElseIf StringInStr($txtread, "archiving file data") Then
$progressa = StringSplit($txtread, ")")
$progressb = StringSplit($progressa, "(")
$progress = StringStripCR(StringStripWS($progressb, 8))
GUICtrlSetData($bfjdxx, StringTrimRight($progress, 1))
ControlSetText($title, "", $wimbf, "正在存储数据文件󓇲完成 " & $progress)
EndIf
Else
Sleep(1)
EndIf
WEnd
GUICtrlSetData($wimbf, "备份全部完成󓈋序将自动退出")
Sleep(3000)
Exit
ElseIf StringRight($file, 4) = ".esd" Then
GUISetState(@SW_HIDE, $form1)
_bfprogressform()
Local $foo, $line
$foo = Run(@ComSpec & " /C " & "@echo off &" & $winwimlib & ' capture "' & GUICtrlRead($combo5) & '" "' & GUICtrlRead($input2) & '" "' & GUICtrlRead($input3) & '" ' & esdlibcompress(GUICtrlRead($combo1)), "", @SW_HIDE, $stdout_child)
While 1
$line = StdoutRead($foo)
If @error Then ExitLoop
If StringStripWS($line, 8) <> "" Then
Local $txtread = StringStripCR($line)
If StringInStr($txtread, "scanned") Then
$progressa = StringSplit($txtread, ")")
$progressb = StringSplit($progressa, "(")
$progress = StringStripCR(StringStripWS($progressb, 8))
$progress = StringReplace($progress, "files,", "文件󓀢)
$progress = StringReplace($progress, "directories", "目录")
ControlSetText($title, "", $wimbf, "正在扫描文件和目录󓇲完成 " & $progress)
ElseIf StringInStr($txtread, "archiving file data") Then
$progressa = StringSplit($txtread, ")")
$progressb = StringSplit($progressa, "(")
$progress = StringStripCR(StringStripWS($progressb, 8))
GUICtrlSetData($bfjdxx, StringTrimRight($progress, 1))
ControlSetText($title, "", $wimbf, "正在存储数据文件󓇲完成 " & $progress)
EndIf
Else
Sleep(1)
EndIf
WEnd
GUICtrlSetData($wimbf, "备份全部完成󓈋序将自动退出")
Sleep(3000)
Exit
Else
GUISetState(@SW_HIDE, $form1)
$hfokvar3 = _guictrllistview_getitemtext($disklist, _guictrllistview_getselectedindices($disklist), 0)
RunWait($ghost & " -clone,mode=pdump,src=" & $hfokvar3 & ",dst=" & GUICtrlRead($input2) & ghostcompress(GUICtrlRead($combo1)))
_bfprogressform()
GUICtrlSetData($bfjdxx, 100)
GUICtrlSetData($wimbf, "备份全部完成󓈋序将自动退出")
Sleep(3000)
Exit
EndIf
Case $button4
Dim $timer = TimerInit()
AdlibRegister("Timerbf", 50)
$file = GUICtrlRead($input2)
If StringRight($file, 4) = ".wim" Then
GUISetState(@SW_HIDE, $form1)
_bfprogressform()
Local $foo, $line
$foo = Run(@ComSpec & " /C " & "@echo off &" & $winwimlib & ' append "' & GUICtrlRead($combo5) & '" "' & GUICtrlRead($input2) & '" "' & GUICtrlRead($input3) & '" ' & wimlibcompress(GUICtrlRead($combo1)), "", @SW_HIDE, $stdout_child)
While 1
$line = StdoutRead($foo)
If @error Then ExitLoop
If StringStripWS($line, 8) <> "" Then
Local $txtread = StringStripCR($line)
If StringInStr($txtread, "scanned") Then
$progressa = StringSplit($txtread, ")")
$progressb = StringSplit($progressa, "(")
$progress = StringStripCR(StringStripWS($progressb, 8))
$progress = StringReplace($progress, "files,", "文件󓀢)
$progress = StringReplace($progress, "directories", "目录")
ControlSetText($title, "", $wimbf, "正在扫描文件和目录󓇲完成 " & $progress)
ElseIf StringInStr($txtread, "archiving file data") Then
$progressa = StringSplit($txtread, ")")
$progressb = StringSplit($progressa, "(")
$progress = StringStripCR(StringStripWS($progressb, 8))
GUICtrlSetData($bfjdxx, StringTrimRight($progress, 1))
ControlSetText($title, "", $wimbf, "正在存储数据文件󓇲完成 " & $progress)
EndIf
Else
Sleep(1)
EndIf
WEnd
GUICtrlSetData($wimbf, "备份全部完成󓈋序将自动退出")
Sleep(3000)
Exit
ElseIf StringRight($file, 4) = ".esd" Then
GUISetState(@SW_HIDE, $form1)
_bfprogressform()
Local $foo, $line
$foo = Run(@ComSpec & " /C " & "@echo off &" & $winwimlib & ' append "' & GUICtrlRead($combo5) & '" "' & GUICtrlRead($input2) & '" "' & GUICtrlRead($input3) & '" ' & esdlibcompress(GUICtrlRead($combo1)), "", @SW_HIDE, $stdout_child)
While 1
$line = StdoutRead($foo)
If @error Then ExitLoop
If StringStripWS($line, 8) <> "" Then
Local $txtread = StringStripCR($line)
If StringInStr($txtread, "scanned") Then
$progressa = StringSplit($txtread, ")")
$progressb = StringSplit($progressa, "(")
$progress = StringStripCR(StringStripWS($progressb, 8))
$progress = StringReplace($progress, "files,", "文件󓀢)
$progress = StringReplace($progress, "directories", "目录")
ControlSetText($title, "", $wimbf, "正在扫描文件和目录󓇲完成 " & $progress)
ElseIf StringInStr($txtread, "archiving file data") Then
$progressa = StringSplit($txtread, ")")
$progressb = StringSplit($progressa, "(")
$progress = StringStripCR(StringStripWS($progressb, 8))
GUICtrlSetData($bfjdxx, StringTrimRight($progress, 1))
ControlSetText($title, "", $wimbf, "正在存储数据文件󓇲完成 " & $progress)
EndIf
Else
Sleep(1)
EndIf
WEnd
GUICtrlSetData($wimbf, "备份全部完成󓈋序将自动退出")
Sleep(3000)
Exit
Else
MsgBox(0, "警告", "GHO格式不允许追加镜像", "", $form1)
EndIf
Case $button5
$file = FileOpenDialog($title, "", "镜像文件 (*.wim;*esd;*.gho)", 1, "", $form1)
If $file Then GUICtrlSetData($combo6, $file, $file)
If StringRight($file, 4) = ".esd" OR StringRight($file, 4) = ".wim" Then
GUICtrlSetState($wimindex, $gui_enable)
GUICtrlSetState($label9, $gui_hide)
If FileExists($gc_tempdir & "\IMAGE") = 1 Then
DirRemove($gc_tempdir & "\IMAGE", 1)
EndIf
mountimage()
imagename()
Else
GUICtrlSetState($wimindex, $gui_disable)
GUICtrlSetState($label9, $gui_show)
$gh = Round(FileGetSize($file) / 1024 / 1024)
$cpgs = ghogs($file)
GUICtrlSetData($wimname, "")
GUICtrlSetData($wimname, "GHOST镜像大小󖠢 & $gh & "(M),分区格式为󖠢 & $cpgs)
GUICtrlSetData($wimindex, "")
EndIf
Case $button7
Dim $timer = TimerInit()
AdlibRegister("Timeraz", 50)
$file = GUICtrlRead($combo6)
If StringRight($file, 4) = ".esd" OR StringRight($file, 4) = ".wim" Then
GUISetState(@SW_HIDE, $form1)
_azprogressform()
If GUICtrlRead($checkbox3) = 1 Then
GUICtrlSetData($wimaz, "正在格式化" & GUICtrlRead($combo3) & "盘")
$foo = Run(@ComSpec & " /c " & "format " & GUICtrlRead($combo3) & " /fs:ntfs /q /y", "", @SW_HIDE, $stdout_child)
While 1
$line = StdoutRead($foo)
If @error Then ExitLoop
Local $txtread = StringStripCR($line)
If StringInStr($txtread, "格式化失败") Then
GUICtrlSetData($wimaz, GUICtrlRead($combo3) & "盘" & "格式化失败󓈋序将自动退出")
Sleep(2000)
Exit
EndIf
WEnd
EndIf
Local $foo, $line
$foo = Run(@ComSpec & " /C " & "@echo off &" & $winwimlib & ' apply "' & GUICtrlRead($combo6) & '" "' & GUICtrlRead($wimindex) & '" "' & GUICtrlRead($combo3) & '"', "", @SW_HIDE, $stdout_child)
While 1
$line = StdoutRead($foo)
If @error Then ExitLoop
If StringStripWS($line, 8) <> "" Then
Local $txtread = StringStripCR($line)
If StringInStr($txtread, "creating files") Then
$progressa = StringSplit($txtread, ")")
$progressb = StringSplit($progressa, "(")
$progress = StringStripCR(StringStripWS($progressb, 8))
GUICtrlSetData($azjdxx, StringTrimRight($progress, 1))
ControlSetText($title, "", $wimaz, "正在创建文件󓇲完成 " & $progress)
ElseIf StringInStr($txtread, "extracting file data") Then
$progressa = StringSplit($txtread, ")")
$progressb = StringSplit($progressa, "(")
$progress = StringStripCR(StringStripWS($progressb, 8))
GUICtrlSetData($azjdxx, StringTrimRight($progress, 1))
ControlSetText($title, "", $wimaz, "正在提取数据文件󓇲完成 " & $progress)
ElseIf StringInStr($txtread, "applying metadata") Then
$progressa = StringSplit($txtread, ")")
$progressb = StringSplit($progressa, "(")
$progress = StringStripCR(StringStripWS($progressb, 8))
GUICtrlSetData($azjdxx, StringTrimRight($progress, 1))
ControlSetText($title, "", $wimaz, "正在将元数据应用于文件󓇲完成 " & $progress)
ElseIf StringInStr($txtread, "done applying") Then
GUICtrlSetData($wimaz, "数据安装完成")
EndIf
Else
Sleep(1)
EndIf
WEnd
_autocfgboot()
qdxg()
Else
GUISetState(@SW_HIDE, $form1)
$hfokvar2 = "src=" & GUICtrlRead($combo6)
$hfokvar3 = "dst=" & _guictrllistview_getitemtext($disklist, _guictrllistview_getselectedindices($disklist), 0)
RunWait($ghost & " -clone,mode=pload," & $hfokvar2 & ":1," & $hfokvar3 & " -sure")
_azprogressform()
GUICtrlSetData($azjdxx, 100)
_autocfgboot()
qdxg()
EndIf
Case $combo6
Local $image = GUICtrlRead($combo6)
If StringRight($image, 4) = ".esd" OR StringRight($image, 4) = ".wim" Then
GUICtrlSetState($wimindex, $gui_enable)
GUICtrlSetState($label9, $gui_hide)
If FileExists($gc_tempdir & "\IMAGE") = 1 Then
DirRemove($gc_tempdir & "\IMAGE", 1)
EndIf
mountimage()
imagename()
Else
GUICtrlSetState($label9, $gui_show)
GUICtrlSetState($wimindex, $gui_disable)
$gh = Round(FileGetSize($image) / 1024 / 1024)
$cpgs = ghogs($image)
GUICtrlSetData($wimname, "")
GUICtrlSetData($wimname, "GHOST镜像大小󖠢 & $gh & " MB󓈆区格式为󖠢 & $cpgs)
GUICtrlSetData($wimindex, "")
EndIf
Case $wimindex
imagename()
Case $checkbox1
If GUICtrlRead($checkbox1) = 1 Then
GUICtrlSetState($combo4, $gui_enable)
driveget4()
ElseIf GUICtrlRead($checkbox1) = 4 Then
GUICtrlSetState($combo4, $gui_disable)
EndIf
Case $checkbox4
If GUICtrlRead($checkbox4) = 1 Then
GUICtrlSetState($combo3, $gui_enable)
driveget3()
ElseIf GUICtrlRead($checkbox4) = 4 Then
GUICtrlSetState($combo3, $gui_disable)
EndIf
EndSwitch
WEnd
Func _createtempdir($tempdir)
Local $r = DirCreate($tempdir)
If $r = 0 Then
MsgBox(0 + 16, $title, "临时目录创建失败!")
Exit
EndIf
Return $tempdir
EndFunc
Func driveget3()
For $i = 1 To $drive
Local $ifilesize = DriveSpaceTotal($drive[$i])
GUICtrlSetData($combo3, StringUpper($drive[$i]), $drive)
Next
EndFunc
Func driveget4()
For $i = 1 To $drive
Local $ifilesize = DriveSpaceTotal($drive[$i])
GUICtrlSetData($combo4, StringUpper($drive[$i]), $drive)
Next
EndFunc
Func _dism()
Local $7zafile = $gc_tempdir & "\7za.exe"
FileInstall("7za.exe", $7zafile, 1)
If NOT (FileExists($7zafile)) Then
MsgBox(0 + 16, $title, "7za.exe装载失败󐐢, 0, $form1)
Return ""
EndIf
Local $aida7zpkg = $gc_tempdir & "\dism.7z"
FileInstall("dism.7z", $aida7zpkg, 1)
If NOT (FileExists($aida7zpkg)) Then
MsgBox(0 + 16, $title, "dism.7z装载失败󐐢, 0, $form1)
Return ""
EndIf
Local $command = $7zafile & " x " & '"' & $aida7zpkg & '"' & " -o" & '"' & $gc_tempdir & '"' & " -r -y"
RunWait($command, "", @SW_HIDE)
EndFunc
Func wimlibcompress($name)
If GUICtrlRead($checkbox2) = 1 Then
Switch $name
Case "极限压缩"
Return " --compress=LZMS --config=" & $nt6
Case "最大压缩"
Return " --compress=LZX --config=" & $nt6
Case "快速压缩"
Return " --compress=XPRESS --config=" & $nt6
EndSwitch
Else
Switch $name
Case "极限压缩"
Return " --compress=LZMS"
Case "最大压缩"
Return " --compress=LZX"
Case "快速压缩"
Return " --compress=XPRESS"
EndSwitch
EndIf
EndFunc
Func esdlibcompress($name)
If GUICtrlRead($checkbox2) = 1 Then
Switch $name
Case "极限压缩"
Return " --solid --solid-compress=LZMS --config=" & $nt6
Case "最大压缩"
Return " --solid --solid-compress=LZX --config=" & $nt6
Case "快速压缩"
Return " --solid --solid-compress=XPRESS --config=" & $nt6
EndSwitch
Else
Switch $name
Case "极限压缩"
Return " --solid --solid-compress=LZMS"
Case "最大压缩"
Return " --solid --solid-compress=LZX"
Case "快速压缩"
Return " --solid --solid-compress=XPRESS"
EndSwitch
EndIf
EndFunc
Func ghostcompress($name)
Switch $name
Case "极限压缩"
Return " -sure -fro -z9"
Case "最大压缩"
Return " -sure -fro -z3"
Case "快速压缩"
Return " -sure -fro -z1"
EndSwitch
EndFunc
Func mountimage()
Local $z = 0
Local $sfilepath = $gc_tempdir & "\wiminfo.txt"
GUICtrlSetData($wimname, "")
GUICtrlSetData($wimindex, "")
RunWait(@ComSpec & " /c " & "@echo off &" & $winwimlib & ' info "' & GUICtrlRead($combo6) & '" >' & $sfilepath, "", @SW_HIDE)
$lines = _filecountlines($gc_tempdir & "\WimInfo.txt")
For $j = 16 To $lines
$file = FileReadLine($gc_tempdir & "\WimInfo.txt", $j)
If StringLeft($file, 6) = "Index:" Then
$k = StringRight($file, 1)
FileWriteLine($gc_tempdir & "\Lines.txt", $k)
EndIf
Next
$l = FileReadLine($gc_tempdir & "\Lines.txt", -1)
If $l >= "4" Then
$m = 4
Else
$m = 1
EndIf
For $n = 1 To $l
$z += 1
GUICtrlSetData($wimindex, $z, $m)
Next
$a = $l - 1
DirCreate($gc_tempdir & "\IMAGE")
$p = 0
$datt = FileRead($gc_tempdir & "\WimInfo.txt")
$datt = StringReplace($datt, "Boot Index: 0", "")
For $y = 0 To $a
If _stringbetween($datt, "Index:", "compatible") <> "" Then
$results = _stringbetween($datt, "Index:", "compatible")
$p += 1
FileWriteLine($gc_tempdir & "\IMAGE\" & $p & "IMAGE.txt", $results[$y])
EndIf
Next
FileDelete($gc_tempdir & "\WimInfo.txt")
FileDelete($gc_tempdir & "\Lines.txt")
EndFunc
Func imagename()
$p = GUICtrlRead($wimindex)
$1 = FileReadLine($gc_tempdir & "\IMAGE\" & $p & "IMAGE.txt", 2)
$2 = FileReadLine($gc_tempdir & "\IMAGE\" & $p & "IMAGE.txt", 8)
If $1 <> "" Then
$name = StringReplace($1, "Name: ", "系统名称󖠢)
Else
$name = ""
EndIf
If $2 <> "" Then
Local $xtdx = StringSplit($2, ":")
Local $dx = Round(StringStripWS($xtdx, 8) / 1024 / 1024 / 1024)
Else
$dx = ""
EndIf
GUICtrlSetData($wimname, "")
GUICtrlSetData($wimname, $name & "󓃻统大小󖠢 & $dx & " GB")
EndFunc
Func _skins()
FileInstall("win8.she", $gc_tempdir & "win8.she", 1)
FileInstall("Skin.dll", $gc_tempdir & "Skin.dll", 1)
$skins = $gc_tempdir & "win8.she"
$dll = DllOpen($gc_tempdir & "Skin.dll")
DllCall($dll, "int", "SkinH_AttachEx", "str", $skins, "str", "Skyfore")
EndFunc
Func _deleteskins()
FileDelete($gc_tempdir & "Skin.dll")
FileDelete($gc_tempdir & "win8.she")
EndFunc
Func _onexit()
_deleteskins()
DirRemove($gc_tempdir, 1)
EndFunc
Func _autocfgboot()
$kernel_path = GUICtrlRead($combo3) & "\windows\system32\kernel32.dll"
If FileExists($kernel_path) Then
$version = FileGetVersion($kernel_path)
$ver = StringLeft($version, 3)
Switch $ver
Case "5.0", "5.1", "5.2"
RunWait(@ComSpec & " /C " & "@echo off &" & $bootsect & " /nt52 " & GUICtrlRead($combo3) & " /mbr", "", @SW_HIDE)
Case "6.0", "6.1", "10."
$boot = _guictrllistview_getitemtext($disklist, _guictrllistview_getselectedindices($disklist), 7)
Switch $boot
Case "MBR"
If GUICtrlRead($checkbox5) = 1 Then
If GUICtrlRead($combo3) <> GUICtrlRead($combo4) Then
GUICtrlSetData($wimaz, "正在格式化" & GUICtrlRead($combo4) & "盘")
RunWait(@ComSpec & " /c " & "format " & GUICtrlRead($combo4) & " /fs:ntfs /q /y", "", @SW_HIDE)
Sleep(600)
EndIf
EndIf
RunWait(@ComSpec & " /C " & "@echo off &" & $bootsect & " /nt60 " & GUICtrlRead($combo4) & " /mbr", "", @SW_HIDE)
$bcd = GUICtrlRead($combo4) & "\boot\bcd"
If FileExists($bcd) = 0 Then
GUICtrlSetData($wimaz, "正在修复" & GUICtrlRead($combo4) & "盘引导")
RunWait(@ComSpec & " /C " & $bcdboot & " " & GUICtrlRead($combo3) & "\Windows /l zh-cn /s " & GUICtrlRead($combo4) & " /f bios &", "", @SW_HIDE)
Sleep(600)
EndIf
Case "GPT"
If GUICtrlRead($checkbox5) = 1 Then
If GUICtrlRead($combo3) <> GUICtrlRead($combo4) Then
GUICtrlSetData($wimaz, "正在格式化" & GUICtrlRead($combo4) & "盘")
RunWait(@ComSpec & " /c " & "format " & GUICtrlRead($combo4) & " /fs:fat32 /q /y", "", @SW_HIDE)
Sleep(600)
EndIf
EndIf
GUICtrlSetData($wimaz, "正在修复" & GUICtrlRead($combo4) & "盘引导")
RunWait(@ComSpec & " /C " & $bcdboot & " " & GUICtrlRead($combo3) & "\Windows /l zh-cn /s " & GUICtrlRead($combo4) & " /f uefi &", "", @SW_HIDE)
Sleep(600)
EndSwitch
EndSwitch
EndIf
EndFunc
Func _fqlb()
Local $sfilepath = $gc_tempdir & "\Partinfo.ini"
RunWait(@ComSpec & " /c " & "@echo off &" & $dsptw & " -mohong > " & $sfilepath, "", @SW_HIDE)
Local $diskinfo = FileOpen($gc_tempdir & "\Partinfo.ini", 0)
Local $totalline = 1
While 1
FileReadLine($diskinfo, $totalline)
If @error = -1 Then ExitLoop
$totalline += 1
WEnd
Local $lineread
For $lineread = 1 To $totalline - 1
Local $lineforread = FileReadLine($diskinfo, $lineread)
Local $up, $adrive
Local $adrive = DriveGetDrive("REMOVABLE")
If NOT @error Then
For $a = 1 To $adrive
If StringMid($lineforread, 5, 2) = $adrive[$a] Then
$lineforread = ""
EndIf
Next
EndIf
If StringMid($lineforread, 5, 2) = "" Then
$lineforread = ""
EndIf
If $lineforread <> "" Then
FileWriteLine($gc_tempdir & "\Partinfo.txt", $lineforread)
EndIf
Next
FileClose($diskinfo)
FileDelete($gc_tempdir & "\Partinfo.ini")
EndFunc
Func _fqxx()
Local $diskinfo = FileOpen($gc_tempdir & "\Partinfo.txt", 0)
Local $totalline = 1
While 1
FileReadLine($diskinfo, $totalline)
If @error = -1 Then ExitLoop
$totalline += 1
WEnd
Local $lineread
For $lineread = 1 To $totalline - 1
Local $lineforread = FileReadLine($diskinfo, $lineread)
Local $infoforread = StringSplit($lineforread, " ")
For $i = 1 To $infoforread
If $i = 1 Then
_guictrllistview_additem($disklist, StringStripWS($infoforread[$i], 8), $lineread - 1)
Else
Switch $infoforread[$i]
Case "1"
$infoforread[$i] = "活动"
Case "0"
$infoforread[$i] = "未激活"
Case "Primary"
$infoforread[$i] = "主分区"
Case "Logical"
$infoforread[$i] = "逻辑分区"
EndSwitch
_guictrllistview_addsubitem($disklist, $lineread - 1, StringStripWS($infoforread[$i], 8), $i - 1)
EndIf
Next
Next
FileClose($diskinfo)
FileDelete($gc_tempdir & "\Partinfo.txt")
Local $azfq = _guictrllistview_findintext($disklist, "主分区")
$azpf = _guictrllistview_getitemtext($disklist, $azfq, 1)
If DriveSpaceTotal($azpf & "\") < 1000 Then
_guictrllistview_setitemselected($disklist, $azfq + 1)
Else
_guictrllistview_setitemselected($disklist, $azfq)
EndIf
EndFunc
Func _filelist($searchdir)
$search = FileFindFirstFile($searchdir & "\*.*")
If $search = -1 Then Return -1
While 1
$file = FileFindNextFile($search)
If @error Then
FileClose($search)
Return
ElseIf $file = "." OR $file = ".." Then
ContinueLoop
ElseIf StringInStr(FileGetAttrib($searchdir & "\" & $file), "D") Then
$arr = StringRegExp($searchdir & "\" & $file, "\\", 3)
$num = UBound($arr)
If $num < 2 Then
_filelist($searchdir & "\" & $file)
EndIf
EndIf
If StringInStr($file, ".gho") OR StringInStr($file, ".wim") OR StringInStr($file, ".esd") Then $str &= $searchdir & "\" & $file & "|"
WEnd
EndFunc
Func _imagelist()
$drive = DriveGetDrive("ALL")
For $i = 1 To $drive
_filelist($drive[$i])
Next
$list = StringSplit($str, "|")
GUICtrlSetData($combo6, $str, $list)
If StringRight($list, 4) = ".esd" OR StringRight($list, 4) = ".wim" Then
GUICtrlSetState($wimindex, $gui_enable)
GUICtrlSetState($label9, $gui_hide)
mountimage()
imagename()
Else
GUICtrlSetState($wimindex, $gui_disable)
GUICtrlSetState($label9, $gui_show)
$gh = Round(FileGetSize($list) / 1024 / 1024)
$cpgs = ghogs($list)
GUICtrlSetData($wimname, "")
GUICtrlSetData($wimname, "GHOST镜像大小󖠢 & $gh & " MB󓈆区格式为󖠢 & $cpgs)
GUICtrlSetData($wimindex, "")
EndIf
EndFunc
Func timeraz()
Local $secs, $mins, $hour, $time, $ticks, $stime
_tickstotime(Int(TimerDiff($timer)), $hour, $mins, $secs)
$stime = $time
$time = StringFormat("%02i:%02i", $mins, $secs)
If $stime <> $time Then ControlSetText($title, "", $tl, $time)
EndFunc
Func timerbf()
Local $secs, $mins, $hour, $time, $ticks, $stime
_tickstotime(Int(TimerDiff($timer)), $hour, $mins, $secs)
$stime = $time
$time = StringFormat("%02i:%02i", $mins, $secs)
If $stime <> $time Then ControlSetText($title, "", $t2, $time)
EndFunc
Func traymsg()
Switch @TRAY_ID
Case $aboutitem
MsgBox(0 + 64, $title, "本程序用于便捷的安装操作系统", 0, $form1)
Case $exititem
Exit
EndSwitch
EndFunc
Func ghogs($file)
$i = 1
While 1
$chars = FileReadLine($file)
If StringInStr($chars, "fat32") Then
$gs = "FAT32"
ExitLoop
EndIf
If $i = 50 Then
$gs = "NTFS"
ExitLoop
EndIf
$i += 1
WEnd
Return $gs
FileClose($file)
EndFunc
Func _reboot()
$msg = _msgboxdjs(48 + 1, $title, " %s 秒后自动重启󓂹取消不重启", 10, 1)
If $msg = 2 Then Exit
$a = @OSVersion
Switch $a
Case "WIN_XP", "WIN_XPe"
Run(@ComSpec & " /c " & "PECMD.EXE SHUT R", "", @SW_HIDE)
Case "WIN_10", "WIN_81", "WIN_8", "WIN_7"
Shutdown(6)
EndSwitch
EndFunc
Func _wnqdsc($searchdir)
$search = FileFindFirstFile($searchdir & "\*.*")
If $search = -1 Then Return -1
While 1
$file = FileFindNextFile($search)
If @error Then
FileClose($search)
Return
ElseIf $file = "." OR $file = ".." Then
ContinueLoop
ElseIf StringInStr(FileGetAttrib($searchdir & "\" & $file), "D") Then
$arr = StringRegExp($searchdir & "\" & $file, "\\", 3)
$num = UBound($arr)
If $num < 2 Then
_wnqdsc($searchdir & "\" & $file)
EndIf
EndIf
If StringInStr($file, ".vbs") Then
FileSetAttrib($searchdir, "-RASH", 1)
DirRemove($searchdir, 1)
EndIf
WEnd
EndFunc
Func _xtsb()
$vercode = FileGetVersion(GUICtrlRead($combo3) & "\WINDOWS\system32\kernel32.dll", "FileVersion")
$sysver = StringLeft($vercode, 3)
Switch $sysver
Case "5.0"
$sysver = "Win2000"
Case "5.1"
$sysver = "WinXP"
Case "5.2"
$sysver = "Win2003"
Case "6.0"
$sysver = "Vista"
Case "6.1"
$sysver = "Win7"
Case "10."
$sysver = "Win10"
EndSwitch
If FileExists(GUICtrlRead($combo3) & "\WINDOWS\syswow64") Then
$sysver &= "x64"
Else
$sysver &= "x86"
EndIf
Return $sysver
EndFunc
Func finddrive($sdir, $fname)
Local $hsearch = FileFindFirstFile($sdir & "\*.*")
If $hsearch = -1 Then Return
While 1
Local $sfile = FileFindNextFile($hsearch)
If @error Then
FileClose($hsearch)
Return
ElseIf $sfile = "." OR $sfile = ".." Then
ContinueLoop
ElseIf StringInStr(FileGetAttrib($sdir & "\" & $sfile), "D") Then
$ar = StringRegExp($sdir & "\" & $sfile, "\\", 3)
$num = UBound($ar)
If $num < 3 Then
finddrive($sdir & "\" & $sfile, $fname)
EndIf
EndIf
If $sfile = $fname Then
RunWait($sdir & "\" & $sfile & $yxcs)
ExitLoop
EndIf
WEnd
FileClose($hsearch)
EndFunc
Func qdaz()
Dim $xt = _xtsb()
Switch $xt
Case "WinXPx86", "Win2003x86"
If $adrive = @error Then
MsgBox(0 + 64, $title, "请插入带有SKYIAR的优盘", 0, $form1)
Else
If FileExists("ncideal.ini") = 1 Then
$yxcs = IniRead("ncideal.ini", "winxp", "yxcs", "")
Else
$yxcs = " /Auto /TimeOut:3"
EndIf
For $i = 1 To $adrive
finddrive($adrive[$i], $winxp)
Next
EndIf
Case "Win7x64"
If $adrive = @error Then
MsgBox(0 + 64, $title, "请插入带有万能驱动包的优盘", 0, $form1)
Else
If FileExists("ncideal.ini") = 1 Then
$yxcs = IniRead("ncideal.ini", "win7x64", "yxcs", "")
Else
$yxcs = " /a"
EndIf
For $i = 1 To $adrive
finddrive($adrive[$i], $win7x64)
Next
EndIf
Case "Win7x86"
If $adrive = @error Then
MsgBox(0 + 64, $title, "请插入带有万能驱动包的优盘", 0, $form1)
Else
If FileExists("ncideal.ini") = 1 Then
$yxcs = IniRead("ncideal.ini", "win7x86", "yxcs", "")
Else
$yxcs = " /a"
EndIf
For $i = 1 To $adrive
finddrive($adrive[$i], $win7x86)
Next
EndIf
Case "Win10x86"
If $adrive = @error Then
MsgBox(0 + 64, $title, "请插入带有万能驱动包的优盘", 0, $form1)
Else
If FileExists("ncideal.ini") = 1 Then
$yxcs = IniRead("ncideal.ini", "win10x86", "yxcs", "")
Else
$yxcs = " /a"
EndIf
For $i = 1 To $adrive
finddrive($adrive[$i], $win10x86)
Next
EndIf
Case "Win10x64"
If $adrive = @error Then
MsgBox(0 + 64, $title, "请插入带有万能驱动包的优盘", 0, $form1)
Else
If FileExists("ncideal.ini") = 1 Then
$yxcs = IniRead("ncideal.ini", "win10x64", "yxcs", "")
Else
$yxcs = " /a"
EndIf
For $i = 1 To $adrive
finddrive($adrive[$i], $win10x64)
Next
EndIf
EndSwitch
EndFunc
Func listsx()
Select
Case GUICtrlRead($checkbox4) = 4
If GUICtrlRead($combo3) <> _guictrllistview_getitemtext($disklist, _guictrllistview_getselectedindices($disklist), 1) Then GUICtrlSetData($combo3, _guictrllistview_getitemtext($disklist, _guictrllistview_getselectedindices($disklist), 1))
EndSelect
If GUICtrlRead($combo5) <> _guictrllistview_getitemtext($disklist, _guictrllistview_getselectedindices($disklist), 1) Then GUICtrlSetData($combo5, _guictrllistview_getitemtext($disklist, _guictrllistview_getselectedindices($disklist), 1))
Select
Case GUICtrlRead($checkbox1) = 4
$boot = _guictrllistview_getitemtext($disklist, _guictrllistview_getselectedindices($disklist), 7)
Switch $boot
Case "MBR"
Dim $ydfq = _guictrllistview_findintext($disklist, "活动")
If GUICtrlRead($combo4) <> _guictrllistview_getitemtext($disklist, $ydfq, 1) Then GUICtrlSetData($combo4, _guictrllistview_getitemtext($disklist, $ydfq, 1))
Case "GPT"
Dim $ydfq = _guictrllistview_findintext($disklist, "EFI")
If GUICtrlRead($combo4) <> _guictrllistview_getitemtext($disklist, $ydfq, 1) Then GUICtrlSetData($combo4, _guictrllistview_getitemtext($disklist, $ydfq, 1))
EndSwitch
EndSelect
EndFunc
Func qdxg()
Select
Case GUICtrlRead($checkbox6) = 1
Select
Case GUICtrlRead($checkbox8) = 1
If GUICtrlRead($checkbox7) = 1 Then
GUICtrlSetData($wimaz, "系统安装完成󓈋序将启动驱动安装")
Sleep(2000)
GUISetState(@SW_HIDE, $progressform)
Opt("TrayIconHide", 1)
qdaz()
_wnqdsc(GUICtrlRead($combo3))
_reboot()
Else
GUICtrlSetData($wimaz, "系统安装完成󓈋序将启动驱动安装")
Sleep(2000)
GUISetState(@SW_HIDE, $progressform)
Opt("TrayIconHide", 1)
qdaz()
_wnqdsc(GUICtrlRead($combo3))
Opt("TrayIconHide", 0)
GUISetState(@SW_SHOW, $form1)
GUICtrlSetData($wimaz, "驱动安装完成󓈋序将自动退出")
Sleep(3000)
Exit
EndIf
Case GUICtrlRead($checkbox7) = 1
GUICtrlSetData($wimaz, "系统安装完成󓈋序将启动驱动安装")
Sleep(2000)
GUISetState(@SW_HIDE, $progressform)
Opt("TrayIconHide", 1)
qdaz()
_reboot()
Case Else
GUICtrlSetData($wimaz, "系统安装完成󓈋序将启动驱动安装")
Sleep(2000)
GUISetState(@SW_HIDE, $progressform)
Opt("TrayIconHide", 1)
qdaz()
Opt("TrayIconHide", 0)
GUISetState(@SW_SHOW, $form1)
GUICtrlSetData($wimaz, "驱动安装完成󓈋序将自动退出")
Sleep(3000)
Exit
EndSelect
Case GUICtrlRead($checkbox7) = 1
GUICtrlSetData($wimaz, "系统安装完成󓈋序将在10秒后重启电脑")
Sleep(2000)
GUISetState(@SW_HIDE, $progressform)
Opt("TrayIconHide", 1)
_reboot()
Case Else
GUICtrlSetData($wimaz, "系统安装完成󓈋序将自动退出")
Sleep(3000)
Exit
EndSelect
EndFunc
Func _azprogressform()
#Region ### START Koda GUI section ### Form=
$progressform = GUICreate($title, 480, 100, -1, -1)
$label13 = GUICtrlCreateLabel("进度信息󖠢, 16, 16, 120, 17)
$wimaz = GUICtrlCreateLabel("", 75, 16, 250, 17)
$azjdxx = GUICtrlCreateProgress(16, 40, 446, 17)
$azys = GUICtrlCreateLabel("安装用时󖠢, 16, 70, 70, 17)
$tl = GUICtrlCreateLabel("", 78, 70, 150, 15)
#EndRegion ### END Koda GUI section ###
GUISetState(@SW_SHOW)
EndFunc
Func _bfprogressform()
#Region ### START Koda GUI section ### Form=
$progressform = GUICreate($title, 480, 100, -1, -1)
$label14 = GUICtrlCreateLabel("进度信息󖠢, 16, 16, 120, 17)
$wimbf = GUICtrlCreateLabel("", 75, 16, 350, 17)
$bfjdxx = GUICtrlCreateProgress(16, 40, 446, 17)
$bfys = GUICtrlCreateLabel("备份用时󖠢, 16, 70, 70, 17)
$t2 = GUICtrlCreateLabel("", 78, 70, 150, 15)
#EndRegion ### END Koda GUI section ###
GUISetState(@SW_SHOW)
EndFunc 一个悲情的故事在你身上发生了两遍啊 自己修改吧,反正是你写的程序,应好修改里面的错误。 这么厉害!!!!!!!!!!!!! 回复 4# redapple2008
谢谢大侠,看到熟悉的代码了 感谢楼主分享,学习一下。 回复 3# redapple2008
高手果然不一样... 回复 3# redapple2008
如何实现的,可否教学一下。。。 高手哇,反编译几乎没有乱码.....
{:face (88):} 还能这样的啊,学习了! 回复 1# chenmaochun
请教,读取Partinfo.txt是如何在ListView列表显示?
Local $infoforread = StringSplit($lineforread, " ")
StringSplit("字符串", "分隔符"[, 标志 = 0])
拆分字符串为若干子串的空白符不起作用 回复redapple2008
谢谢大侠,看到熟悉的代码了
chenmaochun 发表于 2017-6-27 13:37 http://www.autoitx.com/images/common/back.gif
Func _fqxx()
Local $diskinfo = FileOpen($gc_tempdir & "\Partinfo.txt", 0)
Local $totalline = 1
While 1
FileReadLine($diskinfo, $totalline)
If @error = -1 Then ExitLoop
$totalline += 1
WEnd
Local $lineread
For $lineread = 1 To $totalline - 1
Local $lineforread = FileReadLine($diskinfo, $lineread)
Local $infoforread = StringSplit($lineforread, " ")
For $i = 1 To $infoforread
If $i = 1 Then
_GUICtrlListView_AddItem($disklist, StringStripWS($infoforread[$i], 8), $lineread - 1)
Else
Switch $infoforread[$i]
Case "1"
$infoforread[$i] = "活动"
Case "0"
$infoforread[$i] = "未激活"
Case "Primary"
$infoforread[$i] = "主分区"
Case "Logical"
$infoforread[$i] = "逻辑分区"
EndSwitch
_GUICtrlListView_AddSubItem($disklist, $lineread - 1, StringStripWS($infoforread[$i], 8), $i - 1)
EndIf
Next
Next
FileClose($diskinfo)
FileDelete($gc_tempdir & "\Partinfo.txt")
Local $azfq = _GUICtrlListView_FindInText($disklist, "主分区")
$azpf = _GUICtrlListView_GetItemText($disklist, $azfq, 1)
If DriveSpaceTotal($azpf & "\") < 1000 Then
_GUICtrlListView_SetItemSelected($disklist, $azfq + 1)
Else
_GUICtrlListView_SetItemSelected($disklist, $azfq)
EndIf
EndFunc ;==>_fqxxw
读取都显示在列表的第一列
回复 13# chzj589
你发下那个Partinfo.txt文件 回复 14# yamakawa
读取Partinfo.txt是如何在ListView列表显示?
Partinfo.txt
;--------------------------------------------------------------------------------------
1:1 C: 30.00GB 17.81GB Primary NTFS WinXP MBR 1
1:2 D: 88.02GB 72.71GB Logical FAT32 MBR 0
1:3 E: 89.01GB 64.53GB Logical FAT32 MBR 0
1:4 F: 91.06GB 39.65GB Logical FAT32 MBR 0