jianny Posted September 3, 2010 Share Posted September 3, 2010 How to clear ie cache. Link to comment Share on other sites More sharing options...
SeF Posted September 3, 2010 Share Posted September 3, 2010 $ClearID = "8" Run("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess " & $ClearID) ;You can delete/clear others things by changing $ClearID's value: ;History Only = 1 ;Cookies Only = 2 ;Temporary Internet Files Only = 8 ;Form Data Only = 16 ;Password History Only = 32 ;Everything = 255 Link to comment Share on other sites More sharing options...
wakillon Posted September 3, 2010 Share Posted September 3, 2010 hi Sef ! I use Chrome, is that it will work for ?Or do you know another way... AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
jianny Posted September 4, 2010 Author Share Posted September 4, 2010 $ClearID = "8" Run("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess " & $ClearID) ;You can delete/clear others things by changing $ClearID's value: ;History Only = 1 ;Cookies Only = 2 ;Temporary Internet Files Only = 8 ;Form Data Only = 16 ;Password History Only = 32 ;Everything = 255 My IE6 can not use it. Link to comment Share on other sites More sharing options...
Juvigy Posted September 6, 2010 Share Posted September 6, 2010 This is valid for IE7 + . For chrome i would suggest to find the dir where it stores the files and delete manually with filedelete or dirremove functions. Link to comment Share on other sites More sharing options...
wakillon Posted September 6, 2010 Share Posted September 6, 2010 (edited) I found a sulution for Delete cache of Chromium Family browser ( Google chrome, Chromium, Iron... ) There is an option for delete password and cookies too...expandcollapse popup#cs Script To Clear Chromium Family browser cache ( Google chrome, Chromium, Iron... ) Adapted of script found on http://www.winhelponline.com/blog/quickly-clear-the-google-chrome-cache-using-script/ Customizations To clear stored passwords and Cookies, change : $_ClearPasswordsAndCookies = 0 To $_ClearPasswordsAndCookies = 1 #ce $_ClearPasswordsAndCookies = 0 $WshShell = ObjCreate ( "WScript.Shell" ) $objFSO = ObjCreate ( "Scripting.FileSystemObject" ) $_DirtyFlags = 0 $_Msg1 = "Google Chrome cache is cleared !" $_Msg2 = "Google Chrome cache could not be cleared !" If @OSVersion = "WIN_XP" Then $_CacheLoc = $WshShell.ExpandEnvironmentStrings ( "%USERPROFILE%" ) & "\Local Settings\Application Data\Google\Chrome\User Data\Default" Else ; vista, seven $_CacheLoc = $WshShell.ExpandEnvironmentStrings ( "%LocalAppData%" ) & "\Google\Chrome\User Data\Default" EndIf If FileExists ( $_CacheLoc ) Then If ProcessExists ( 'Chrome.exe' ) Then Exit Msgbox ( 0, 'Exiting', 'Google Chrome Not close' & @CRLF & @CRLF & 'Close your Chrome browser first !' & @CRLF ) Else $_CacheLoc = StringReplace ( $_CacheLoc, 'Google\Chrome', 'Chromium' ) ; if not chrome user try chromium user. If Not FileExists ( $_CacheLoc ) Then Exit Msgbox ( 0, 'Exiting', 'Google Chrome Not found' & @CRLF & @CRLF & 'And Chromium browser Not found too ! ' & @CRLF ) If ProcessExists ( 'Chromium.exe' ) Or ProcessExists ( 'iron.exe' ) Then Exit Msgbox ( 0, 'Exiting', 'Chromium Not close' & @CRLF & @CRLF & 'Close your Chromium or Iron browser first !' & @CRLF ) EndIf $_CacheSize = Round ( DirGetSize ( $_CacheLoc & '\Cache' ) / 1024 /1024 ) Msgbox ( 0, 'Found', 'Cache Directory Size : ' & $_CacheSize & ' MB', 3 ) If $objFSO.FolderExists ( $_CacheLoc ) Then $objFolder = $objFSO.GetFolder ( $_CacheLoc ) $colFiles = $objFolder.Files For $objFile in $colFiles If $_ClearPasswordsAndCookies = 0 Then If $objFile.Name <> "Current Session" And $objFile.Name <> "Current Tabs" And $objFile.Name <> "Cookies" And $objFile.Name <> "Bookmarks" And $objFile.Name <> "Preferences" And $objFile.Name <> "Web Data" Then $objFSO.DeleteFile ( $objFile ) Else If $objFile.Name <> "Current Session" And $objFile.Name <> "Current Tabs" And $objFile.Name <> "Preferences" And $objFile.Name <> "Bookmarks" Then $objFSO.DeleteFile ( $objFile ) EndIf If @error <> 0 Then $_DirtyFlags = 1 Next If $objFSO.FolderExists ( $_CacheLoc & "\cache" ) Then $objFSO.deletefolder ( $_CacheLoc & "\cache" ) If @error <> 0 Then $_DirtyFlags = 1 If $_DirtyFlags = 1 Then Msgbox ( 0, 'Error', $_Msg2, 5 ) Else Msgbox ( 0, 'Success', $_Msg1, 5 ) EndIf EndIf ExitIf Windows Seven's users can tell me if cache directory path is same than vista ! Edited September 6, 2010 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now