Clear Cache
Clear Cache
Function RestorePcHealth()
' Declare the object
Set WshShell = CreateObject("WScript.Shell")
' To clear Temporary Internet files
WshShell.run "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8"
wait(5)
'To clear browsing cookies
WshShell.run "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2"
wait(5)
'To Clear Browsing History
WshShell.run "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1"
wait(5)
Const TemporaryFolder = 2
Set fso = CreateObject("Scripting.FileSystemObject")
Set folder = fso.GetSpecialFolder(TemporaryFolder)
' delete all files in temp folder
for each f in folder.Files
On Error Resume Next
name = f.name
f.Delete True
Next
' delete all subfolders and files from the temp folder
For Each f In folder.SubFolders
On Error Resume Next
name = f.name
If name<>"TD_80" Then
f.Delete True
'else
'msgbox "Cant Delete TD_80 folder"
End If
Next
End Function