遇到的问题是:构建程序之后,也仍然无法单个文件运行,就是释放临时文件这块不知道有什么问题没有,请大家帮帮忙了!帮我看下哪里出差错,非常感谢
#cs ----------------------------------------------------------------------------
AutoIt 版本: 测试版
脚本版本: 1.0
脚本功能: 个人资料转移及恢复默认值
#ce ----------------------------------------------------------------------------
#AutoIt3Wrapper_Res_Comment=资料转移器
#AutoIt3Wrapper_Res_Description=DIY
#AutoIt3Wrapper_Res_Fileversion=1.0.0.0
#NoTrayIcon
#include <GUIConstants.au3>
$re1 = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
$re2 = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
Dim $dll
$hwnd = GUICreate("个人资料转移", 412, 318)
Dim $bf ="vista_style.skf"
_SkinGUI("SkinCrafterDll.dll", $bf, $hwnd)
FileInstall("SkinCrafterDll.dll",@TempDir&"SkinCrafterDll.dll",1)
FileInstall("vista_style.skf",@TempDir&"vista_style.skf",1)
FileInstall("a.jpg",@TempDir&"a.jpg")
GUISetFont(9, 400)
GUICtrlCreateTab(8, 88, 396, 212)
GUICtrlCreatePic(@TempDir&"a.jpg", 0, 0, 412, 80)
$Label1 = GUICtrlCreateLabel("轻松速备份 安全又简便 ", 15, 303, 186, 17)
$Label2 = GUICtrlCreateLabel("电脑专家", 298, 303, 153, 17)
;第一分页
$Tab1 = GUICtrlCreateTabItem("文档数据")
GUICtrlCreateGroup("", 16, 114, 378, 174)
$Tab1Check1 = GUICtrlCreateCheckbox("我的文档", 32, 130, 65, 17)
GUICtrlSetState($Tab1Check1, $GUI_CHECKED)
$Tab1Check2 = GUICtrlCreateCheckbox("收藏夹", 32, 156, 57, 17)
GUICtrlSetState($Tab1Check2, $GUI_CHECKED)
$Tab1Check3 = GUICtrlCreateCheckbox("Cokies", 32, 182, 57, 17)
$Tab1Check4 = GUICtrlCreateCheckbox("桌面文件", 32, 208, 65, 17)
$reg3 = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", "Cookies")
$Input1 = GUICtrlCreateInput(@MyDocumentsDir, 120, 130, 257, 18, 0x0008)
GUICtrlSetState($Input1, $GUI_DISABLE);使控件不可用
$Input2 = GUICtrlCreateInput(@FavoritesDir, 120, 156, 257, 18, 0x0008)
GUICtrlSetState($Input2, $GUI_DISABLE)
$Input3 = GUICtrlCreateInput($reg3, 120, 182, 257, 18, 0x0008)
GUICtrlSetState($Input3, $GUI_DISABLE)
$Input4 = GUICtrlCreateInput(@DesktopDir, 120, 208, 257, 18, 0x0008)
GUICtrlSetState($Input4, $GUI_DISABLE)
$Button1 = GUICtrlCreateButton("移 动", 317, 248, 60, 22, 0)
$tab1combo1 = GUICtrlCreateCombo("", 230, 248, 60, 30)
$disk = DriveGetDrive("FIXED")
If Not @error Then
For $i = 1 To $disk[0]
GUICtrlSetData($tab1combo1, $disk[$i], $disk[2])
Next
EndIf
GUICtrlCreateGroup("转移选项", 26, 234, 176, 40)
$Tab1Check5 = GUICtrlCreateCheckbox("更改目录", 32, 248, 72, 17)
GUICtrlSetState($Tab1Check5, $GUI_CHECKED)
$Tab1Check6 = GUICtrlCreateCheckbox("转移文档数据", 108, 248, 92, 17)
GUICtrlSetState($Tab1Check6, $GUI_CHECKED)
;第二分页
$Tab2 = GUICtrlCreateTabItem("临时文件")
GUICtrlCreateGroup("", 16, 114, 378, 174)
$Tab2Check1 = GUICtrlCreateCheckbox("临时目录", 32, 130, 65, 17)
GUICtrlSetState($Tab2Check1, $GUI_CHECKED)
$Tab2Check2 = GUICtrlCreateCheckbox("IE缓存", 32, 156, 57, 17)
GUICtrlSetState($Tab2Check2, $GUI_CHECKED)
$Tab2Check3 = GUICtrlCreateCheckbox("历史记录", 32, 182, 65, 17)
$Tab2Check4 = GUICtrlCreateCheckbox("最近文档", 32, 208, 73, 17)
$reg6 = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", "Cache")
$reg7 = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", "History")
$reg8 = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", "Recent")
$Input5 = GUICtrlCreateInput(@TempDir, 120, 130, 257, 18, 0x0008)
GUICtrlSetState($Input5, $GUI_DISABLE)
$Input6 = GUICtrlCreateInput($reg6, 120, 156, 257, 18, 0x0008)
GUICtrlSetState($Input6, $GUI_DISABLE)
$Input7 = GUICtrlCreateInput($reg7, 120, 182, 257, 18, 0x0008)
GUICtrlSetState($Input7, $GUI_DISABLE)
$Input8 = GUICtrlCreateInput($reg8, 120, 208, 257, 18, 0x0008)
GUICtrlSetState($Input8, $GUI_DISABLE)
$Button2 = GUICtrlCreateButton("移 动", 317, 248, 60, 22, 0)
$tab2combo1 = GUICtrlCreateCombo("", 230, 248, 60, 30)
$disk = DriveGetDrive("FIXED")
If Not @error Then
For $i = 1 To $disk[0]
GUICtrlSetData($tab2combo1, $disk[$i], $disk[2])
Next
EndIf
GUICtrlCreateGroup("转移选项", 26, 234, 176, 40)
$Tab2Check5 = GUICtrlCreateCheckbox("转移目录", 32, 248, 72, 17)
GUICtrlSetState($Tab2Check5, $GUI_CHECKED)
$Tab2Check6 = GUICtrlCreateCheckbox("清除原文件", 108, 248, 92, 17)
GUICtrlSetState($Tab2Check6, $GUI_CHECKED)
;第三分页
$Tab3 = GUICtrlCreateTabItem("文件路径")
GUICtrlCreateGroup("恢复系统默认值", 16, 114, 378, 174, $BS_CENTER)
GUICtrlCreateGroup("文档数据", 40, 134, 120, 137, $BS_CENTER)
$Tab3Check1 = GUICtrlCreateCheckbox("我的文档", 60, 156, 65, 17)
$Tab3Check2 = GUICtrlCreateCheckbox("收藏夹", 60, 182, 57, 17)
$Tab3Check3 = GUICtrlCreateCheckbox("Cokies", 60, 208, 57, 17)
$Tab3Check4 = GUICtrlCreateCheckbox("桌面文件", 60, 234, 65, 17)
GUICtrlCreateGroup("临时文件", 252, 134, 120, 137, $BS_CENTER)
$Tab3Check5 = GUICtrlCreateCheckbox("临时目录", 272, 156, 65, 17)
$Tab3Check6 = GUICtrlCreateCheckbox("IE缓存", 272, 182, 57, 17)
$Tab3Check7 = GUICtrlCreateCheckbox("历史记录", 272, 208, 65, 17)
$Tab3Check8 = GUICtrlCreateCheckbox("最近文档", 272, 234, 65, 17)
$Tab3Check9 = GUICtrlCreateCheckbox("更改目录", 175, 160, 65, 17)
GUICtrlSetState($Tab3Check9, $GUI_CHECKED)
$Tab3Check10 = GUICtrlCreateCheckbox("转移数据", 175, 190, 65, 17)
GUICtrlSetState($Tab3Check10, $GUI_CHECKED)
$Button3 = GUICtrlCreateButton("恢复默认值", 172, 220, 70, 22, 0)
;第四分页
$Tab4 = GUICtrlCreateTabItem("使用说明")
GUICtrlCreateGroup("", 16, 114, 378, 174)
GUICtrlCreateLabel(" 本程序为绿色软件,用于目录更改或数据备份。可将文档数据、临时文件转移到指定位置中。其中,COOKIES、收藏夹、桌面将移动到" & Chr(13) & "目标位置‘我的文档’目录下;而TEMP、IE缓存、历史记录、最近文档将移动到目标位置‘TEMP’目录下。这过程,你可根据自己需要选择相关的‘转移选项’来定义它的工作方式。" & Chr(13) & Chr(13) & " 本程序在转移数据时,会实现条件判断是否删除原文件(如:‘转移数据’和‘更改目录’都选中时,程序就会删除原文件。因为勾选了‘数据转移’已备份数据到目标目录下)。" & Chr(13) & Chr(13) & " 当然,您还可以把目录 转移/还原 到系统默认路径。", 25, 130, 366, 165)
;第五分页
$Tab5 = GUICtrlCreateTabItem("关于软件")
GUICtrlCreateGroup("", 16, 114, 378, 174)
GUICtrlCreateGroup("", 80, 134, 249, 137)
GUICtrlCreateLabel("个人资料转移器", 120, 152, 170, 20)
GUICtrlSetColor(-1, 0x008080)
GUICtrlCreateLabel("感谢您的使用", 120, 176, 93, 19)
GUICtrlCreateLabel("本工具依据源码修改制作", 120, 200, 149, 19)
GUICtrlCreateLabel("不断完善 追求卓越", 120, 224, 150, 19)
GUICtrlSetColor(-1, 0x0000FF)
GUISetState()
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $Button1
GUICtrlSetState($Button1, $GUI_DISABLE)
If GUICtrlRead($Tab1Check1) <> $GUI_CHECKED And GUICtrlRead($Tab1Check2) <> $GUI_CHECKED And GUICtrlRead($Tab1Check3) <> $GUI_CHECKED And GUICtrlRead($Tab1Check4) <> $GUI_CHECKED And GUICtrlRead($Tab1Check5) <> $GUI_CHECKED And GUICtrlRead($Tab1Check6) <> $GUI_CHECKED Then
MsgBox(0, "提示", "对不起,您没有选择任何项目!")
ElseIf GUICtrlRead($Tab1Check5) = $GUI_CHECKED And GUICtrlRead($Tab1Check6) = $GUI_CHECKED Then
_JU1()
ElseIf GUICtrlRead($Tab1Check5) = $GUI_CHECKED Then
_JU2()
ElseIf GUICtrlRead($Tab1Check6) = $GUI_CHECKED Then
_JU3()
Else
MsgBox(0, "提示", "请选择'转移选项'中的一项或全部")
EndIf
GUICtrlSetState($Button1, $GUI_ENABLE)
Case $msg = $Button2
GUICtrlSetState($Button2, $GUI_DISABLE)
If GUICtrlRead($Tab2Check1) <> $GUI_CHECKED And GUICtrlRead($Tab2Check2) <> $GUI_CHECKED And GUICtrlRead($Tab2Check3) <> $GUI_CHECKED And GUICtrlRead($Tab2Check4) <> $GUI_CHECKED And GUICtrlRead($Tab2Check5) <> $GUI_CHECKED And GUICtrlRead($Tab2Check6) <> $GUI_CHECKED Then
MsgBox(0, "提示", "对不起,您没有选择任何项目!")
ElseIf GUICtrlRead($Tab2Check5) = $GUI_CHECKED And GUICtrlRead($Tab2Check6) = $GUI_CHECKED Then
_Check1()
ElseIf GUICtrlRead($Tab2Check5) = $GUI_CHECKED Then
_Check2()
ElseIf GUICtrlRead($Tab2Check6) = $GUI_CHECKED Then
_Check3()
Else
MsgBox(0, "提示", "请选择'转移选项'中的一项或全部")
EndIf
GUICtrlSetState($Button2, $GUI_ENABLE)
Case $msg = $Button3
GUICtrlSetState($Button3, $GUI_DISABLE)
If GUICtrlRead($Tab3Check1) <> $GUI_CHECKED And GUICtrlRead($Tab3Check2) <> $GUI_CHECKED And GUICtrlRead($Tab3Check3) <> $GUI_CHECKED And GUICtrlRead($Tab3Check4) <> $GUI_CHECKED And GUICtrlRead($Tab3Check5) <> $GUI_CHECKED And GUICtrlRead($Tab3Check6) <> $GUI_CHECKED And GUICtrlRead($Tab3Check7) <> $GUI_CHECKED And GUICtrlRead($Tab3Check8) <> $GUI_CHECKED And GUICtrlRead($Tab3Check9) <> $GUI_CHECKED And GUICtrlRead($Tab3Check10) <> $GUI_CHECKED Then
MsgBox(0, "提示", "对不起,您没有选择任何项目!")
ElseIf GUICtrlRead($Tab3Check9) = $GUI_CHECKED And GUICtrlRead($Tab3Check10) = $GUI_CHECKED Then
_hu1()
ElseIf GUICtrlRead($Tab3Check9) = $GUI_CHECKED Then
_hu2()
ElseIf GUICtrlRead($Tab3Check10) = $GUI_CHECKED Then
_hu3()
Else
MsgBox(0, "提示", "请选择'更改目录' '转移数据'中的一项或全部")
EndIf
GUICtrlSetState($Button3, $GUI_ENABLE)
Case $msg = $Label2
ShellExecute("http://79161061.qzone.qq.com")
EndSelect
WEnd
Func _JU1()
$ke = GUICtrlRead($Tab1Check1) <> $GUI_CHECKED And GUICtrlRead($Tab1Check2) <> $GUI_CHECKED And GUICtrlRead($Tab1Check3) <> $GUI_CHECKED And GUICtrlRead($Tab1Check4) <> $GUI_CHECKED
Select
Case $ke = 1
MsgBox(0, "提示", "请返回选择相关项目!")
Case $ke <> 1
$rd1 = GUICtrlRead($tab1combo1)
ToolTip("正在转移相关文件及删除原文件,请稍候...", @DesktopWidth - 300, @DesktopHeight - 80, "", 0, 1)
If GUICtrlRead($Tab1Check1) = $GUI_CHECKED And @MyDocumentsDir <> $rd1 & "\我的文档" Then
DirCopy(@MyDocumentsDir, $rd1 & "\我的文档", 1)
DirMove($rd1 & "\我的文档\My Music", $rd1 & "\我的文档\我的音乐")
DirMove($rd1 & "\我的文档\My Pictures", $rd1 & "\我的文档\图片收藏")
If @MyDocumentsDir = @UserProfileDir & "\My Documents" Then
FileRecycle(@MyDocumentsDir & "\*.*")
EndIf ;考虑到如果当前我的文档路径不是原系统默认位置时,可能“我的文档”文件夹中有其它如“COOKIES”类的文件,删除会出错
RegWrite($re1, "Personal", "REG_SZ", $rd1 & "\我的文档")
RegWrite($re2, "Personal", "REG_SZ", $rd1 & "\我的文档")
RegWrite($re1, "My Music", "REG_SZ", $rd1 & "\我的文档\我的音乐")
RegWrite($re2, "My Music", "REG_SZ", $rd1 & "\我的文档\我的音乐")
RegWrite($re1, "My Pictures", "REG_SZ", $rd1 & "\我的文档\图片收藏")
RegWrite($re2, "My Pictures", "REG_SZ", $rd1 & "\我的文档\图片收藏")
EndIf
If GUICtrlRead($Tab1Check2) = $GUI_CHECKED And @FavoritesDir <> $rd1 & "\我的文档\收藏夹" Then
DirCopy(@FavoritesDir, $rd1 & "\我的文档\收藏夹", 1)
FileRecycle(@FavoritesDir & "\*.*")
RegWrite($re1, "Favorites", "REG_SZ", $rd1 & "\我的文档\收藏夹")
RegWrite($re2, "Favorites", "REG_SZ", $rd1 & "\我的文档\收藏夹")
EndIf
If GUICtrlRead($Tab1Check3) = $GUI_CHECKED And $reg3 <> $rd1 & "\我的文档\Cookies" Then
DirCopy($reg3, $rd1 & "\我的文档\Cookies", 1)
FileRecycle($reg3 & "\*.*")
RegWrite($re1, "Cookies", "REG_SZ", $rd1 & "\我的文档\Cookies")
RegWrite($re2, "Cookies", "REG_SZ", $rd1 & "\我的文档\Cookies")
EndIf
If GUICtrlRead($Tab1Check4) = $GUI_CHECKED And @DesktopDir <> $rd1 & "\我的文档\桌面" Then
DirCopy(@DesktopDir, $rd1 & "\我的文档\桌面", 1)
FileRecycle(@DesktopDir & "\*.*")
RegWrite($re1, "Desktop", "REG_SZ", $rd1 & "\我的文档\桌面")
RegWrite($re2, "Desktop", "REG_SZ", $rd1 & "\我的文档\桌面")
EndIf
FileRecycleEmpty(@HomeDrive)
ToolTip("")
MsgBox(0, "完成", "转移成功,注销或重启后生效!", 2)
EndSelect
EndFunc ;==>_JU1
Func _JU2()
$ke = GUICtrlRead($Tab1Check1) <> $GUI_CHECKED And GUICtrlRead($Tab1Check2) <> $GUI_CHECKED And GUICtrlRead($Tab1Check3) <> $GUI_CHECKED And GUICtrlRead($Tab1Check4) <> $GUI_CHECKED
Select
Case $ke = 1
MsgBox(0, "提示", "请返回选择相关项目!")
Case $ke <> 1
$rd1 = GUICtrlRead($tab1combo1)
If GUICtrlRead($Tab1Check1) = $GUI_CHECKED And @MyDocumentsDir <> $rd1 & "\我的文档" Then
DirCreate($rd1 & "\我的文档\我的音乐")
DirCreate($rd1 & "\我的文档\我的视频")
DirCreate($rd1 & "\我的文档\图片收藏")
RegWrite($re1, "Personal", "REG_SZ", $rd1 & "\我的文档")
RegWrite($re2, "Personal", "REG_SZ", $rd1 & "\我的文档")
RegWrite($re1, "My Music", "REG_SZ", $rd1 & "\我的文档\我的音乐")
RegWrite($re2, "My Music", "REG_SZ", $rd1 & "\我的文档\我的音乐")
RegWrite($re1, "My Pictures", "REG_SZ", $rd1 & "\我的文档\图片收藏")
RegWrite($re2, "My Pictures", "REG_SZ", $rd1 & "\我的文档\图片收藏")
EndIf
If GUICtrlRead($Tab1Check2) = $GUI_CHECKED And @FavoritesDir <> $rd1 & "\我的文档\收藏夹" Then
DirCreate($rd1 & "\我的文档\收藏夹")
RegWrite($re1, "Favorites", "REG_SZ", $rd1 & "\我的文档\收藏夹")
RegWrite($re2, "Favorites", "REG_SZ", $rd1 & "\我的文档\收藏夹")
EndIf
If GUICtrlRead($Tab1Check3) = $GUI_CHECKED And $reg3 <> $rd1 & "\我的文档\Cookies" Then
DirCreate($rd1 & "\我的文档\Cookies")
RegWrite($re1, "Cookies", "REG_SZ", $rd1 & "\我的文档\Cookies")
RegWrite($re2, "Cookies", "REG_SZ", $rd1 & "\我的文档\Cookies")
EndIf
If GUICtrlRead($Tab1Check4) = $GUI_CHECKED And @DesktopDir <> $rd1 & "\我的文档\桌面" Then
DirCreate($rd1 & "\我的文档\桌面")
RegWrite($re1, "Desktop", "REG_SZ", $rd1 & "\我的文档\桌面")
RegWrite($re2, "Desktop", "REG_SZ", $rd1 & "\我的文档\桌面")
EndIf
MsgBox(0, "完成", "目录更改成功,注销或重启后生效!", 2)
EndSelect
EndFunc ;==>_JU2
Func _JU3()
$ke = GUICtrlRead($Tab1Check1) <> $GUI_CHECKED And GUICtrlRead($Tab1Check2) <> $GUI_CHECKED And GUICtrlRead($Tab1Check3) <> $GUI_CHECKED And GUICtrlRead($Tab1Check4) <> $GUI_CHECKED
Select
Case $ke = 1
MsgBox(0, "提示", "请返回选择相关项目!")
Case $ke <> 1
$rd1 = GUICtrlRead($tab1combo1)
If GUICtrlRead($Tab1Check1) = $GUI_CHECKED And @MyDocumentsDir <> $rd1 & "\我的文档" Then
DirCopy(@MyDocumentsDir, $rd1 & "\我的文档", 1)
If @MyDocumentsDir = @UserProfileDir & "\My Documents" Then
EndIf
EndIf
If GUICtrlRead($Tab1Check2) = $GUI_CHECKED And @FavoritesDir <> $rd1 & "\我的文档\收藏夹" Then
DirCopy(@FavoritesDir, $rd1 & "\我的文档\收藏夹", 1)
EndIf
If GUICtrlRead($Tab1Check3) = $GUI_CHECKED And $reg3 <> $rd1 & "\我的文档\Cookies" Then
DirCopy($reg3, $rd1 & "\我的文档\Cookies", 1)
EndIf
If GUICtrlRead($Tab1Check4) = $GUI_CHECKED And @DesktopDir <> $rd1 & "\我的文档\桌面" Then
DirCopy(@DesktopDir, $rd1 & "\我的文档\桌面", 1)
EndIf
MsgBox(0, "完成", "数据已备份到目标路径!", 2)
EndSelect
EndFunc ;==>_JU3
Func _Check1()
$ke = GUICtrlRead($Tab2Check1) <> $GUI_CHECKED And GUICtrlRead($Tab2Check2) <> $GUI_CHECKED And GUICtrlRead($Tab2Check3) <> $GUI_CHECKED And GUICtrlRead($Tab2Check4) <> $GUI_CHECKED
Select
Case $ke = 1
MsgBox(0, "提示", "请返回选择相关项目!")
Case $ke <> 1
$rd1 = GUICtrlRead($tab2combo1)
ToolTip("正在清理相关文件,请稍候...", @DesktopWidth - 250, @DesktopHeight - 80, "", 0, 1)
If GUICtrlRead($Tab2Check1) = $GUI_CHECKED And @TempDir <> $rd1 & "\Temp\FileTemp" Then
DirCreate($rd1 & "\Temp\FileTemp")
DirCopy(@TempDir, $rd1 & "\Temp\FileTemp", 1)
FileRecycle(@TempDir & "\*.*")
RegWrite("HKEY_CURRENT_USER\Environment", "Temp", "REG_SZ", $rd1 & "\Temp\FileTemp")
RegWrite("HKEY_CURRENT_USER\Environment", "Tmp", "REG_SZ", $rd1 & "\Temp\FileTemp")
EndIf
If GUICtrlRead($Tab2Check2) = $GUI_CHECKED And $reg6 <> $rd1 & "\Temp\IE Temp" Then
DirCreate($rd1 & "\Temp\IE Temp")
DirCopy($reg6, $rd1 & "\Temp\IE Temp", 1)
FileRecycle($reg6 & "\*.*")
RegWrite($re1, "Cache", "REG_SZ", $rd1 & "\Temp\IE Temp")
RegWrite($re2, "Cache", "REG_SZ", $rd1 & "\Temp\IE Temp")
EndIf
If GUICtrlRead($Tab2Check3) = $GUI_CHECKED And $reg7 <> $rd1 & "\Temp\History" Then
DirCreate($rd1 & "\Temp\History")
DirCopy($reg7, $rd1 & "\Temp\History", 1)
FileRecycle($reg7 & "\*.*")
RegWrite($re1, "History", "REG_SZ", $rd1 & "\Temp\History")
RegWrite($re2, "History", "REG_SZ", $rd1 & "\Temp\History")
EndIf
If GUICtrlRead($Tab2Check4) = $GUI_CHECKED And $reg8 <> $rd1 & "\Temp\Recent" Then
DirCreate($rd1 & "\Temp\Recent")
DirCopy($reg8, $rd1 & "\Temp\Recent", 1)
FileRecycle($reg8 & "\*.*")
RegWrite($re1, "Recent", "REG_SZ", $rd1 & "\Temp\Recent")
RegWrite($re2, "Recent", "REG_SZ", $rd1 & "\Temp\Recent")
EndIf
FileRecycleEmpty(@HomeDrive)
ToolTip("")
MsgBox(0, "完成", "目标文件转移完成,注销或重启后生效!", 2)
EndSelect
EndFunc ;==>_Check1
Func _Check2()
$ke = GUICtrlRead($Tab2Check1) <> $GUI_CHECKED And GUICtrlRead($Tab2Check2) <> $GUI_CHECKED And GUICtrlRead($Tab2Check3) <> $GUI_CHECKED And GUICtrlRead($Tab2Check4) <> $GUI_CHECKED
Select
Case $ke = 1
MsgBox(0, "提示", "请返回选择相关项目!")
Case $ke <> 1
ToolTip("正在转移相关文件,请稍候...", @DesktopWidth - 250, @DesktopHeight - 80, "", 0, 1)
$rd1 = GUICtrlRead($tab2combo1)
If GUICtrlRead($Tab2Check1) = $GUI_CHECKED And @TempDir <> $rd1 & "\Temp\FileTemp" Then
DirCreate($rd1 & "\Temp\FileTemp")
DirCopy(@TempDir, $rd1 & "\Temp\FileTemp", 1)
RegWrite("HKEY_CURRENT_USER\Environment", "Temp", "REG_SZ", $rd1 & "\Temp\FileTemp")
RegWrite("HKEY_CURRENT_USER\Environment", "Tmp", "REG_SZ", $rd1 & "\Temp\FileTemp")
EndIf
If GUICtrlRead($Tab2Check2) = $GUI_CHECKED And $reg6 <> $rd1 & "\Temp\IE Temp" Then
DirCreate($rd1 & "\Temp\IE Temp")
DirCopy($reg6, $rd1 & "\Temp\IE Temp", 1)
RegWrite($re1, "Cache", "REG_SZ", $rd1 & "\Temp\IE Temp")
RegWrite($re2, "Cache", "REG_SZ", $rd1 & "\Temp\IE Temp")
EndIf
If GUICtrlRead($Tab2Check3) = $GUI_CHECKED And $reg7 <> $rd1 & "\Temp\History" Then
DirCreate($rd1 & "\Temp\History")
DirCopy($reg7, $rd1 & "\Temp\History", 1)
RegWrite($re1, "History", "REG_SZ", $rd1 & "\Temp\History")
RegWrite($re2, "History", "REG_SZ", $rd1 & "\Temp\History")
EndIf
If GUICtrlRead($Tab2Check4) = $GUI_CHECKED And $reg8 <> $rd1 & "\Temp\Recent" Then
DirCreate($rd1 & "\Temp\Recent")
DirCopy($reg8, $rd1 & "\Temp\Recent", 1)
RegWrite($re1, "Recent", "REG_SZ", $rd1 & "\Temp\Recent")
RegWrite($re2, "Recent", "REG_SZ", $rd1 & "\Temp\Recent")
EndIf
ToolTip("")
MsgBox(0, "完成", "目标文件转移完成,注销或重启后生效!", 2)
EndSelect
EndFunc ;==>_Check2
Func _Check3()
$ke = GUICtrlRead($Tab2Check1) <> $GUI_CHECKED And GUICtrlRead($Tab2Check2) <> $GUI_CHECKED And GUICtrlRead($Tab2Check3) <> $GUI_CHECKED And GUICtrlRead($Tab2Check4) <> $GUI_CHECKED
Select
Case $ke = 1
MsgBox(0, "提示", "请返回选择相关项目!")
Case $ke <> 1
$rd1 = GUICtrlRead($tab2combo1)
ToolTip("正在清理相关文件,请稍候...", @DesktopWidth - 250, @DesktopHeight - 80, "", 0, 1)
If GUICtrlRead($Tab2Check1) = $GUI_CHECKED Then
FileRecycle(@TempDir & "\*.*")
EndIf
If GUICtrlRead($Tab2Check2) = $GUI_CHECKED Then
FileRecycle($reg6 & "\*.*")
EndIf
If GUICtrlRead($Tab2Check3) = $GUI_CHECKED Then
FileRecycle($reg7 & "\*.*")
EndIf
If GUICtrlRead($Tab2Check4) = $GUI_CHECKED Then
FileRecycle($reg8 & "\*.*")
EndIf
FileRecycleEmpty(@HomeDrive)
ToolTip("")
MsgBox(0, "完成", "目标文件清理完成!", 2)
EndSelect
EndFunc ;==>_Check3
Func _hu1()
$ke = GUICtrlRead($Tab3Check1) <> $GUI_CHECKED And GUICtrlRead($Tab3Check2) <> $GUI_CHECKED And GUICtrlRead($Tab3Check3) <> $GUI_CHECKED And GUICtrlRead($Tab3Check4) <> $GUI_CHECKED And GUICtrlRead($Tab3Check5) <> $GUI_CHECKED And GUICtrlRead($Tab3Check6) <> $GUI_CHECKED And GUICtrlRead($Tab3Check7) <> $GUI_CHECKED And GUICtrlRead($Tab3Check8) <> $GUI_CHECKED
Select
Case $ke = 1
MsgBox(0, "提示", "请返回选择相关项目!")
Case $ke <> 1
ToolTip("正在转移相关文件,请稍候...", @DesktopWidth - 250, @DesktopHeight - 80, "", 0, 1)
If GUICtrlRead($Tab3Check1) = $GUI_CHECKED And @MyDocumentsDir <> @UserProfileDir & "\My Documents" Then
DirCopy(@MyDocumentsDir, @UserProfileDir & "\My Documents", 1)
DirRemove(@UserProfileDir & "\My Documents\Cookies", 1)
DirRemove(@UserProfileDir & "\My Documents\桌面", 1)
DirRemove(@UserProfileDir & "\My Documents\收藏夹", 1)
RegWrite($re1, "Personal", "REG_SZ", @UserProfileDir & "\My Documents")
RegWrite($re2, "Personal", "REG_SZ", @UserProfileDir & "\My Documents")
RegWrite($re1, "My Music", "REG_SZ", @UserProfileDir & "\My Documents\我的音乐")
RegWrite($re2, "My Music", "REG_SZ", @UserProfileDir & "\My Documents\我的音乐")
RegWrite($re1, "My Pictures", "REG_SZ", @UserProfileDir & "\My Documents\图片收藏")
RegWrite($re2, "My Pictures", "REG_SZ", @UserProfileDir & "\My Documents\图片收藏")
EndIf
If GUICtrlRead($Tab3Check2) = $GUI_CHECKED And @FavoritesDir <> @UserProfileDir & "\Favorites" Then
DirCopy(@FavoritesDir, @UserProfileDir & "\Favorites", 1)
RegWrite($re1, "Favorites", "REG_SZ", @UserProfileDir & "\Favorites")
RegWrite($re2, "Favorites", "REG_SZ", @UserProfileDir & "\Favorites")
EndIf
If GUICtrlRead($Tab3Check3) = $GUI_CHECKED And $reg3 <> @UserProfileDir & "\Cookies" Then
DirCopy($reg3, @UserProfileDir & "\Cookies", 1)
RegWrite($re1, "Cookies", "REG_SZ", @UserProfileDir & "\Cookies")
RegWrite($re2, "Cookies", "REG_SZ", @UserProfileDir & "\Cookies")
EndIf
If GUICtrlRead($Tab3Check4) = $GUI_CHECKED And @DesktopDir <> @UserProfileDir & "\桌面" Then
DirCopy(@DesktopDir, @UserProfileDir & "\桌面", 1)
RegWrite($re1, "Desktop", "REG_SZ", @UserProfileDir & "\桌面")
RegWrite($re2, "Desktop", "REG_SZ", @UserProfileDir & "\桌面")
EndIf
If GUICtrlRead($Tab3Check5) = $GUI_CHECKED And @TempDir <> @UserProfileDir & "\Local Settings\Temp" Then
DirCreate(@UserProfileDir & "\Local Settings\Temp")
DirCopy(@TempDir & "\FileTemp", @UserProfileDir & "\Local Settings\Temp", 1)
RegWrite("HKEY_CURRENT_USER\Environment", "Temp", "REG_SZ", @UserProfileDir & "\Local Settings\Temp")
RegWrite("HKEY_CURRENT_USER\Environment", "Tmp", "REG_SZ", @UserProfileDir & "\Local Settings\Temp")
EndIf
If GUICtrlRead($Tab3Check6) = $GUI_CHECKED And $reg6 <> @UserProfileDir & "\Local Settings\Temporary Internet Files" Then
DirCopy($reg6, @UserProfileDir & "\Local Settings\Temporary Internet Files", 1)
RegWrite($re1, "Cache", "REG_SZ", @UserProfileDir & "\Local Settings\Temporary Internet Files")
RegWrite($re2, "Cache", "REG_SZ", @UserProfileDir & "\Local Settings\Temporary Internet Files")
EndIf
If GUICtrlRead($Tab3Check7) = $GUI_CHECKED And $reg7 <> @UserProfileDir & "\Local Settings\History" Then
DirCopy($reg7, @UserProfileDir & "\Local Settings\History", 1)
RegWrite($re1, "History", "REG_SZ", @UserProfileDir & "\Local Settings\History")
RegWrite($re2, "History", "REG_SZ", @UserProfileDir & "\Local Settings\History")
EndIf
If GUICtrlRead($Tab3Check8) = $GUI_CHECKED And $reg8 <> @UserProfileDir & "\Recent" Then
DirCopy($reg8, @UserProfileDir & "\Recent", 1)
RegWrite($re1, "Recent", "REG_SZ", @UserProfileDir & "\Recent")
RegWrite($re2, "Recent", "REG_SZ", @UserProfileDir & "\Recent")
EndIf
ToolTip("")
MsgBox(0, "完成", "已恢复到系统默认值,注销或重启后生效!", 2)
EndSelect
EndFunc ;==>_hu1
Func _hu2()
$ke = GUICtrlRead($Tab3Check1) <> $GUI_CHECKED And GUICtrlRead($Tab3Check2) <> $GUI_CHECKED And GUICtrlRead($Tab3Check3) <> $GUI_CHECKED And GUICtrlRead($Tab3Check4) <> $GUI_CHECKED And GUICtrlRead($Tab3Check5) <> $GUI_CHECKED And GUICtrlRead($Tab3Check6) <> $GUI_CHECKED And GUICtrlRead($Tab3Check7) <> $GUI_CHECKED And GUICtrlRead($Tab3Check8) <> $GUI_CHECKED
Select
Case $ke = 1
MsgBox(0, "提示", "请返回选择相关项目!")
Case $ke <> 1
If GUICtrlRead($Tab3Check1) = $GUI_CHECKED And @MyDocumentsDir <> @UserProfileDir & "\My Documents" Then
DirCreate(@UserProfileDir & "\My Documents\我的音乐")
DirCreate(@UserProfileDir & "\My Documents\我的视频")
DirCreate(@UserProfileDir & "\My Documents\图片收藏")
RegWrite($re1, "Personal", "REG_SZ", @UserProfileDir & "\My Documents")
RegWrite($re2, "Personal", "REG_SZ", @UserProfileDir & "\My Documents")
RegWrite($re1, "My Music", "REG_SZ", @UserProfileDir & "\My Documents\我的音乐")
RegWrite($re2, "My Music", "REG_SZ", @UserProfileDir & "\My Documents\我的音乐")
RegWrite($re1, "My Pictures", "REG_SZ", @UserProfileDir & "\My Documents\图片收藏")
RegWrite($re2, "My Pictures", "REG_SZ", @UserProfileDir & "\My Documents\图片收藏")
EndIf
If GUICtrlRead($Tab3Check2) = $GUI_CHECKED And @FavoritesDir <> @UserProfileDir & "\Favorites" Then
DirCreate(@UserProfileDir & "\Favorites")
RegWrite($re1, "Favorites", "REG_SZ", @UserProfileDir & "\Favorites")
RegWrite($re2, "Favorites", "REG_SZ", @UserProfileDir & "\Favorites")
EndIf
If GUICtrlRead($Tab3Check3) = $GUI_CHECKED And $reg3 <> @UserProfileDir & "\Cookies" Then
DirCreate(@UserProfileDir & "\Cookies")
RegWrite($re1, "Cookies", "REG_SZ", @UserProfileDir & "\Cookies")
RegWrite($re2, "Cookies", "REG_SZ", @UserProfileDir & "\Cookies")
EndIf
If GUICtrlRead($Tab3Check4) = $GUI_CHECKED And @DesktopDir <> @UserProfileDir & "\桌面" Then
DirCreate(@UserProfileDir & "\桌面")
RegWrite($re1, "Desktop", "REG_SZ", @UserProfileDir & "\桌面")
RegWrite($re2, "Desktop", "REG_SZ", @UserProfileDir & "\桌面")
EndIf
If GUICtrlRead($Tab3Check5) = $GUI_CHECKED And @TempDir <> @UserProfileDir & "\Local Settings\Temp" Then
DirCreate(@UserProfileDir & "\Local Settings\Temp")
RegWrite("HKEY_CURRENT_USER\Environment", "Temp", "REG_SZ", @UserProfileDir & "\Local Settings\Temp")
RegWrite("HKEY_CURRENT_USER\Environment", "Tmp", "REG_SZ", @UserProfileDir & "\Local Settings\Temp")
EndIf
If GUICtrlRead($Tab3Check6) = $GUI_CHECKED And $reg6 <> @UserProfileDir & "\Local Settings\Temporary Internet Files" Then
DirCreate(@UserProfileDir & "\Local Settings\Temporary Internet Files")
RegWrite($re1, "Cache", "REG_SZ", @UserProfileDir & "\Local Settings\Temporary Internet Files")
RegWrite($re2, "Cache", "REG_SZ", @UserProfileDir & "\Local Settings\Temporary Internet Files")
EndIf
If GUICtrlRead($Tab3Check7) = $GUI_CHECKED And $reg7 <> @UserProfileDir & "\Local Settings\History" Then
DirCreate(@UserProfileDir & "\Local Settings\History")
RegWrite($re1, "History", "REG_SZ", @UserProfileDir & "\Local Settings\History")
RegWrite($re2, "History", "REG_SZ", @UserProfileDir & "\Local Settings\History")
EndIf
If GUICtrlRead($Tab3Check8) = $GUI_CHECKED And $reg8 <> @UserProfileDir & "\Recent" Then
DirCreate(@UserProfileDir & "\Recent")
RegWrite($re1, "Recent", "REG_SZ", @UserProfileDir & "\Recent")
RegWrite($re2, "Recent", "REG_SZ", @UserProfileDir & "\Recent")
EndIf
MsgBox(0, "完成", "已恢复到系统默认值,注销或重启后生效!", 2)
EndSelect
EndFunc ;==>_hu2
Func _hu3()
$ke = GUICtrlRead($Tab3Check1) <> $GUI_CHECKED And GUICtrlRead($Tab3Check2) <> $GUI_CHECKED And GUICtrlRead($Tab3Check3) <> $GUI_CHECKED And GUICtrlRead($Tab3Check4) <> $GUI_CHECKED And GUICtrlRead($Tab3Check5) <> $GUI_CHECKED And GUICtrlRead($Tab3Check6) <> $GUI_CHECKED And GUICtrlRead($Tab3Check7) <> $GUI_CHECKED And GUICtrlRead($Tab3Check8) <> $GUI_CHECKED
Select
Case $ke = 1
MsgBox(0, "提示", "请返回选择相关项目!")
Case $ke <> 1
ToolTip("正在转移相关文件,请稍候...", @DesktopWidth - 250, @DesktopHeight - 80, "", 0, 1)
If GUICtrlRead($Tab3Check1) = $GUI_CHECKED Then
DirCopy(@MyDocumentsDir, @UserProfileDir & "\My Documents", 1)
DirRemove(@UserProfileDir & "\My Documents\Cookies")
DirRemove(@UserProfileDir & "\My Documents\桌面")
DirRemove(@UserProfileDir & "\My Documents\收藏夹")
EndIf
If GUICtrlRead($Tab3Check2) = $GUI_CHECKED Then
DirCopy(@FavoritesDir, @UserProfileDir & "\Favorites", 1)
EndIf
If GUICtrlRead($Tab3Check3) = $GUI_CHECKED Then
DirCopy($reg3, @UserProfileDir & "\Cookies", 1)
EndIf
If GUICtrlRead($Tab3Check4) = $GUI_CHECKED Then
DirCopy(@DesktopDir, @UserProfileDir & "\桌面", 1)
EndIf
If GUICtrlRead($Tab3Check5) = $GUI_CHECKED Then
DirCreate(@UserProfileDir & "\Local Settings\Temp")
DirCopy(@TempDir & "\FileTemp", @UserProfileDir & "\Local Settings\Temp", 1)
EndIf
If GUICtrlRead($Tab3Check6) = $GUI_CHECKED Then
DirCopy($reg6, @UserProfileDir & "\Local Settings\Temporary Internet Files", 1)
EndIf
If GUICtrlRead($Tab3Check7) = $GUI_CHECKED Then
DirCopy($reg7, @UserProfileDir & "\Local Settings\History", 1)
EndIf
If GUICtrlRead($Tab3Check8) = $GUI_CHECKED Then
DirCopy($reg8, @UserProfileDir & "\Recent", 1)
EndIf
ToolTip("")
MsgBox(0, "完成", "数据已备份到系统默认目录!", 2)
EndSelect
EndFunc ;==>_hu3
;
;
Func _SkinGUI($SkincrafterDll, $SkincrafterSkin, $Handle)
$dll = DllOpen($SkincrafterDll)
DllCall($dll, "int:cdecl", "InitLicenKeys", "wstr", "1", "wstr", "", "wstr", "1@1.com", "wstr", "1")
DllCall($dll, "int:cdecl", "InitDecoration", "int", 1)
DllCall($dll, "int:cdecl", "LoadSkinFromFile", "wstr", $SkincrafterSkin)
DllCall($dll, "int:cdecl", "DecorateAs", "int", $Handle, "int", 25)
DllCall($dll, "int:cdecl", "ApplySkin")
EndFunc ;==>_SkinGUI
Func Quit()
GUISetState(@SW_HIDE)
DllCall($dll, "int:cdecl", "DeInitDecoration")
DllCall($dll, "int:cdecl", "RemoveSkin")
DllClose($dll)
FileDelete(@TempDir&"SkinCrafterDll.dll")
FileDelete(@TempDir&"vista_style.skf")
FileDelete(@TempDir&"a.jpg")
Exit
EndFunc
;
;
[ 本帖最后由 shimc 于 2008-9-9 17:37 编辑 ] |