本帖最后由 smooth 于 2010-11-4 19:18 编辑
下面的代码可以清除IE的临时文件、COOKIE和历史记录,但是会发出警告,
如果能静默执行呢? $IEDir = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer", "Version")
$result = StringLeft($IEDir, 1)
If $result = "6" Then
Dim $F = FileOpen(@TempDir & "\SystemClean.vbs", 2)
FileWriteLine($F, 'CreateObject("Shell.Application").NameSpace(34).Items().InvokeVerbEx("delete")')
FileWriteLine($F, 'CreateObject("Shell.Application").NameSpace(32).Items().InvokeVerbEx("delete")')
FileClose($F)
RunWait(@ComSpec & " /c call " & @TempDir & "\SystemClean.vbs", @ScriptDir, @SW_HIDE)
RegDelete("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU")
Sleep(1000)
EndIf
谢谢。 |