#cs ----------------------------------------------------------------------------
58fly
#ce ----------------------------------------------------------------------------
; 脚本开始 - 在这后面添加您的代码.
;判断脚本
$g_szVersion = "chasedream 1.1"
If WinExists($g_szVersion) Then Exit
AutoItWinSetTitle($g_szVersion)
#include <GUIConstants.au3>
#include <Process.au3>
;隐藏托盘图标
opt("TrayIconHide","1")
#Region ### START Koda GUI section ### Form=
$AForm1 = GUICreate("维护工具", 428, 290, 256, 129)
$Group1 = GUICtrlCreateGroup("速度测试", 16, 16, 185, 105)
$Label2 = GUICtrlCreateLabel("硬盘测试:", 32, 48, 55, 17)
$Button1 = GUICtrlCreateButton("开始测试", 104, 40, 75, 25, 0)
$Label3 = GUICtrlCreateLabel("网络测试:", 32, 80, 55, 17)
$Button2 = GUICtrlCreateButton("开始测试", 104, 80, 75, 25, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("垃圾清理", 224, 16, 185, 105)
$Label4 = GUICtrlCreateLabel("系统垃圾:", 240, 48, 55, 17)
$Label5 = GUICtrlCreateLabel("回写垃圾:", 240, 80, 55, 17)
$Button3 = GUICtrlCreateButton("开始执行", 312, 40, 75, 25, 0)
$Button4 = GUICtrlCreateButton("开始执行", 312, 80, 75, 25, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group3 = GUICtrlCreateGroup("服务管理", 16, 144, 185, 105)
$Label6 = GUICtrlCreateLabel("数据服务:", 32, 176, 55, 17)
$Label7 = GUICtrlCreateLabel("辅助服务:", 32, 208, 55, 17)
$Button5 = GUICtrlCreateButton("", 96, 168, 75, 25, 0)
$Button6 = GUICtrlCreateButton("", 96, 208, 75, 25, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group4 = GUICtrlCreateGroup("游戏升级", 224, 144, 185, 105)
$Label8 = GUICtrlCreateLabel("加载镜像:", 240, 176, 55, 17)
$Button7 = GUICtrlCreateButton("开始加载", 312, 168, 75, 25, 0)
$Label9 = GUICtrlCreateLabel("游戏升级:", 240, 208, 55, 17)
$Button8 = GUICtrlCreateButton("开始升级", 312, 208, 75, 25, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Label1 = GUICtrlCreateLabel("版权所有:追梦工作室 程序设计:chasedream QQ:76993559 TEL:13418573463", 8, 264, 413, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
;检测数据服务
if ProcessExists("RTIOSRV.EXE") Then
GUICtrlSetData($Button5,"停止服务")
Else
GUICtrlSetData($Button5,"启动服务")
EndIf
;检测辅助服务
if processexists("Dlxpdhcp.exe") Then
GUICtrlSetData($Button6,"停止服务")
Else
GUICtrlSetData($Button6,"启动服务")
EndIf
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $Button1
hdtune()
Case $Button2
avltool()
case $Button3
system()
case $Button4
rich()
case $Button5
shuju()
case $Button6
fuzhu()
Case $Button7
MZD_IMG()
case $Button8
MzdBits()
EndSwitch
WEnd
;磁盘测试
func hdtune()
fileinstall("HDTune.exe",@tempdir &"\HDTune.exe",1)
run(@tempdir &"\HDTune.exe")
EndFunc
;网络测试
func avltool()
fileinstall("avltool.exe",@tempdir &"\avltool.exe",1)
run(@tempdir &"\avltool.exe")
EndFunc
;系统垃圾
func system()
fileinstall("laji.cmd",@tempdir &"\laji.cmd",1)
run(@tempdir &"\laji.cmd","",@SW_HIDE)
msgbox("64","提示:","系统垃圾清理完毕!")
EndFunc
;回写垃圾
func rich()
_rundos("net stop 锐起无盘xp辅助服务")
_rundos("net stop 锐起无盘xp数据服务")
dirremove("e:\wks",1)
DirCreate("e:\wks")
_rundos("net start 锐起无盘xp辅助服务")
_rundos("net start 锐起无盘xp数据服务")
msgbox("64","恭喜:","锐起回写盘垃圾清理完毕!")
EndFunc
;数据服务
func shuju()
if GUICtrlRead($Button5) = "启动服务" Then
_rundos("net start 锐起无盘xp数据服务")
if ProcessExists("RTIOSRV.EXE") Then
GUICtrlSetData($Button5,"停止服务")
Else
GUICtrlSetData($Button5,"启动服务")
EndIf
Else
_RunDOS("net stop 锐起无盘xp数据服务")
if ProcessExists("RTIOSRV.EXE") Then
GUICtrlSetData($Button5,"停止服务")
Else
GUICtrlSetData($Button5,"启动服务")
EndIf
EndIf
EndFunc
;辅助服务
func fuzhu()
If GUICtrlRead($Button6) = "启动服务" Then
_rundos("net start 锐起无盘xp辅助服务")
if processexists("Dlxpdhcp.exe") Then
GUICtrlSetData($Button6,"停止服务")
Else
GUICtrlSetData($Button6,"启动服务")
EndIf
Else
_rundos("net stop 锐起无盘xp辅助服务")
if processexists("Dlxpdhcp.exe") Then
GUICtrlSetData($Button6,"停止服务")
Else
GUICtrlSetData($Button6,"启动服务")
EndIf
EndIf
EndFunc
;镜像加载
func MZD_IMG()
fileinstall("MZD_IMG.exe",@tempdir &"\MZD_IMG.exe",1)
run(@tempdir &"\MZD_IMG.exe")
EndFunc
;游戏升级
func MzdBits()
fileinstall("MzdBits.exe",@tempdir &"\MzdBits.exe",1)
run(@tempdir &"\MzdBits.exe")
EndFunc












