#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <GuiTab.au3>
$Form1_1 = GUICreate("分页标签对话框", 411, 319, 205, 135)
GUISetIcon("D:\005.ico")
$PageControl1 = GUICtrlCreateTab(9, 9, 396, 256)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("list-1")
$ListView1 = GUICtrlCreateListView("", 24, 48, 361, 169)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$ListView1 = gui()
$Button4 = GUICtrlCreateButton("删除启动项", 55, 225, 75, 25, 0)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Button5 = GUICtrlCreateButton("查看启动项", 278, 225, 75, 25, 0)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$TabSheet2 = GUICtrlCreateTabItem("list-2")
$Checkbox1 = GUICtrlCreateCheckbox("自动结束无响应程序", 24, 49, 137, 19)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Checkbox2 = GUICtrlCreateCheckbox("自动结束无响应服务", 24, 83, 137, 17)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Checkbox3 = GUICtrlCreateCheckbox("卸载当前不使用的DLL", 24, 116, 137, 17)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Checkbox4 = GUICtrlCreateCheckbox("加快程序响应速度", 24, 150, 137, 17)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Checkbox5 = GUICtrlCreateCheckbox("禁止IE自动安装组件", 24, 183, 137, 17)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Checkbox6 = GUICtrlCreateCheckbox("加快菜单显示速度", 24, 217, 137, 17)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Checkbox7 = GUICtrlCreateCheckbox("启动预读减少启动时间", 237, 49, 137, 19)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Checkbox8 = GUICtrlCreateCheckbox("加速IE网页浏览速度", 237, 83, 137, 17)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Checkbox9 = GUICtrlCreateCheckbox("加大图标缓存", 237, 116, 137, 17)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Checkbox10 = GUICtrlCreateCheckbox("关闭系统文件保护", 237, 150, 137, 17)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Checkbox11 = GUICtrlCreateCheckbox("打开启动优化功能", 237, 183, 137, 17)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Checkbox12 = GUICtrlCreateCheckbox("最大化文件缓存", 237, 217, 137, 17)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$TabSheet3 = GUICtrlCreateTabItem("list-3")
$Checkbox13 = GUICtrlCreateCheckbox("加速程序运行及秒退", 24, 50, 138, 17)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Checkbox14 = GUICtrlCreateCheckbox("彻底关闭华医生", 24, 82, 137, 17)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Checkbox15 = GUICtrlCreateCheckbox("防止IE异常(自动关闭等)", 24, 114, 150, 17)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Checkbox16 = GUICtrlCreateCheckbox("共享VBS,BAT无提示", 24, 146, 137, 17)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Checkbox17 = GUICtrlCreateCheckbox("减少浏览器与程序假死几率", 24, 178, 180, 17)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Checkbox18 = GUICtrlCreateCheckbox("快速响应应用程序请求", 24, 210, 145, 17)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Checkbox19 = GUICtrlCreateCheckbox("清除DLL缓存加速系统", 237, 50, 145, 17)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Checkbox20 = GUICtrlCreateCheckbox("禁止错误报告", 237, 82, 113, 17)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Checkbox21 = GUICtrlCreateCheckbox("防止键盘无应答", 237, 114, 137, 17)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Checkbox22 = GUICtrlCreateCheckbox("清理日韩语加速系统", 237, 146, 137, 17)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Checkbox23 = GUICtrlCreateCheckbox("清除帮助文件加速系统", 237, 178, 137, 17)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Checkbox24 = GUICtrlCreateCheckbox("系统崩溃强制重启", 237, 210, 129, 17)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$TabSheet4 = GUICtrlCreateTabItem("list-4")
GUICtrlSetState(1, $GUI_SHOW)
GUICtrlCreateTabItem("")
$Button1 = GUICtrlCreateButton("确定(&O)", 55, 280, 80, 28, 0)
$Button2 = GUICtrlCreateButton("取消(&C)", 278, 280, 80, 28, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$bj = 1
While 1
if _GUICtrlTab_GetCurSel($PageControl1) = 0 And $bj = 1 then
GUICtrlSetState($ListView1, $GUI_SHOW)
$bj = 0
Elseif _GUICtrlTab_GetCurSel($PageControl1) <> 0 And $bj = 0 Then
GUICtrlSetState($ListView1, $GUI_HIDE)
$bj = 1
Endif
Switch GUIGetMsg()
Case - 3, $Button2
Exit
Case $Button4
Call("kill")
Case $Button5
Call("gui")
EndSwitch
WEnd
Func gui()
If $ListView1 Then GUICtrlDelete($ListView1)
$ListView1 = GUICtrlCreateListView("编号 |启动项值 |完整执行路径 ", 24, 48, 361, 169)
$i = 1
While 1
$r = RegEnumVal("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", $i)
$r2 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", $r)
If $r2 <> "" Or $r = "" Then
$i = $i + 1
Else
ExitLoop
EndIf
GUICtrlCreateListViewItem(" " & $i - 1 & "|" & $r & "|" & $r2, $ListView1)
WEnd
$p = 1
While 1
$w = RegEnumVal("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Runonce", $p)
$w2 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Runonce", $w)
If $w2 <> "" Or $w = "" Then
$p = $p + 1
Else
ExitLoop
EndIf
GUICtrlCreateListViewItem(" " & $p - 1 + $i - 1 & "|" & $w & "|" & $w2, $ListView1)
WEnd
$s = 1
While 1
$e = RegEnumVal("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx", $s)
$e2 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx", $e)
If $e2 <> "" Or $e = "" Then
$s = $s + 1
Else
ExitLoop
EndIf
GUICtrlCreateListViewItem(" " & $s - 1 + $i - 1 + $p - 1 & "|" & $e & "|" & $e2, $ListView1)
WEnd
$u = 1
While 1
$uy = RegEnumVal("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", $u)
$uy2 = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", $uy)
If $uy2 <> "" Or $uy = "" Then
$u = $u + 1
Else
ExitLoop
EndIf
GUICtrlCreateListViewItem(" " & $s - 1 + $i - 1 + $p - 1 + $u - 1 & "|" & $uy & "|" & $uy2, $ListView1)
WEnd
$l = 1
While 1
$ur = RegEnumVal("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce", $l)
$ur2 = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce", $ur)
If $ur2 <> "" Or $ur = "" Then
$l = $l + 1
Else
ExitLoop
EndIf
GUICtrlCreateListViewItem(" " & $s - 1 + $i - 1 + $p - 1 + $u - 1 + $l - 1 & "|" & $ur & "|" & $ur2, $ListView1)
WEnd
Return $ListView1
EndFunc ;==>gui
Func kill()
$read0 = GUICtrlRead(GUICtrlRead($ListView1))
If $read0 = 0 Then
$read = StringSplit($read0, "|")
RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", $read[2])
RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Runonce", $read[2])
RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx", $read[2])
RegDelete("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", $read[2])
RegDelete("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce", $read[2])
EndIf
Return gui()
EndFunc ;==>kill