Google
      
发新话题
打印

Dllcachemanager附源码

本主题由 redapple 于 2008-4-13 08:33 设置高亮

Dllcachemanager附源码

#Region ;**** 参数创建于 AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=G:\常用的图标\MM1.ico
#AutoIt3Wrapper_Res_Comment=jkzhe.com
#AutoIt3Wrapper_Res_Description=QQ350676
#AutoIt3Wrapper_Res_Fileversion=1.0.1.9
#AutoIt3Wrapper_Res_LegalCopyright=阿东
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
Opt("GUIOnEventMode", 1)
Opt("TrayAutoPause",0)
#include <File.au3>
#include <GUIConstants.au3>
Global $nu,$jd,$dj,$Label1,$Progress1,$button1,$button2,$button3,$dfile
$Form1 = GUICreate("Dllcachemanager", 400, 132, -1, -1)
GUISetOnEvent($GUI_EVENT_CLOSE, "iexit")
If Not FileExists(@ScriptDir&"\oem.jpg") Then FileInstall("oem.jpg",@ScriptDir&"\")
$Pic1 = GUICtrlCreatePic(@ScriptDir&"\oem.jpg", 0, 0, 400, 100)
$button1 = GUICtrlCreateButton("备份",330,10,60,20)
GUICtrlSetOnEvent(-1, "ibak")
$button2 = GUICtrlCreateButton("下次启动恢复后删除",240,40,150,20)
GUICtrlSetOnEvent(-1, "irun")
$button3 = GUICtrlCreateButton("恢复",330,70,60,20)
GUICtrlSetOnEvent(-1, "ire")
$Progress1 = GUICtrlCreateProgress(0, 100, 400, 20)
$Label1 = GUICtrlCreateLabel("waitting...", 0, 120, 400, 10)
GUISetState(@SW_SHOW)
If $cmdline[0] > 0 Then
ire()
EndIf
While 1
Sleep(300)
WEnd
Func iexit()
Exit
EndFunc
Func ibak()
$begin = TimerInit()
$nu1 = DirGetSize(@WindowsDir, 1)
$nu2 = DirGetSize(@ProgramFilesDir, 1)
$nu = $nu1[1] + $nu2[1]
$jd = 0
$dj = 100/$nu
$dfile = FileOpen(@WindowsDir&"\jk.dll",2)
_filelist(@WindowsDir)
_filelist(@ProgramFilesDir)
FileClose($dfile)
Run(@ComSpec & ' /C del /a /f /q %windir%\system32\dllcache\*', '', @SW_HIDE) ; _rundos
$dif = TimerDiff($begin)
GUICtrlSetData($Label1,"备份成功,时间为"&Round($dif/1000)&"秒")
EndFunc
Func ire()
DirCreate(@SystemDir&"\dllcache")
$file = FileOpen(@WindowsDir&"\jk.dll", 0)
If $file = -1 Then
  MsgBox(0, "Error", "Unable to open file.")
Else
  $begin = TimerInit()
  $lines = _FileCountLines( @WindowsDir&"\jk.dll" )
  $li = 0
  $lu = 100/$lines
  While 1
   $line = FileReadLine($file)
   If @error = -1 Then ExitLoop
   $li = $li + $lu
   GUICtrlSetData($Progress1,$li)
   GUICtrlSetData($Label1,$line)
   FileCopy($line,@SystemDir&"\dllcache\")
  Wend
  RegDelete("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run","jkzhe")
  $dif = TimerDiff($begin)
  GUICtrlSetData($Label1,"恢复成功,时间为"&Round($dif/1000)&"秒")
EndIf
FileClose($file)
FileDelete(@WindowsDir&"\jk.dll")
EndFunc
Func irun()
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run","jkzhe","REG_SZ",@WindowsDir&"\jkzhe.exe /jk")
MsgBox(4096,"","设置成功")
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") And $file <> "dllcache" Then     
   _filelist($searchdir & "\" & $file)   
  EndIf
  $jd = $jd + $dj
  GUICtrlSetData($Progress1,$jd)
  GUICtrlSetData($Label1,$searchdir & "\" & $file)
  If FileExists(@SystemDir&"\dllcache\"&$file) Then FileWriteLine($dfile,$searchdir & "\" & $file)
WEnd
EndFunc
好不容易忙完,现在总算有点时间了。不能及时回答大家的问题,还请大家多多包函。
勇于思考,敢于行动,不逃避问题。
业务联系:dvd制作,各种系统、平面广告设计、3D设计,电脑专业维修,网络组建,MTV个人像册、视频处理!
电话:13423195467

TOP

界面与下载
原作者:阿东
附件: 您所在的用户组无法下载或查看附件
好不容易忙完,现在总算有点时间了。不能及时回答大家的问题,还请大家多多包函。
勇于思考,敢于行动,不逃避问题。
业务联系:dvd制作,各种系统、平面广告设计、3D设计,电脑专业维修,网络组建,MTV个人像册、视频处理!
电话:13423195467

TOP

哪个版本啊。。。。。

TOP

发新话题