d4rkdz Posted August 30, 2012 Posted August 30, 2012 hello sorry for asking many questions frequently my script do clear internet explorer history/cache after anytime time it does visit a url (because pages won't show up correctly sometimes) using this line : Run("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255","",@SW_hide ) however this may be annoying because the removing bar keeps showing up everytime , isn't there a way to run in it silently or in background ? or is there another way to delete history and cookies and works on most of windows versions ? thanks for the help
stormbreaker Posted August 30, 2012 Posted August 30, 2012 Read about Winsetstate() in help file. ---------------------------------------- :bye: Hey there, was I helpful? ---------------------------------------- My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1
d4rkdz Posted August 30, 2012 Author Posted August 30, 2012 Read about Winsetstate() in help file. it's not working for me Run("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255","",@SW_hide ) WinWait("[CLASS:#32770]") WinSetState("[CLASS:#32770]", "", @SW_HIDE) i got the class from window spy i took a screenshot
Tripredacus Posted August 30, 2012 Posted August 30, 2012 I used this a long time ago for IE7. I haven't ran it recently and don't know if it still works. ; delete temporary internet files $tif = RegRead("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders","Cache") FileDelete($tif & "*.*") ; delete history $hist = RegRead("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders","History") FileDelete($hist & "*.*") Twitter | MSFN | VGCollect
d4rkdz Posted August 30, 2012 Author Posted August 30, 2012 I used this a long time ago for IE7. I haven't ran it recently and don't know if it still works. ; delete temporary internet files $tif = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Cache") FileDelete($tif & "\*.*") ; delete history $hist = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","History") FileDelete($hist & "\*.*") it's not working , i think it does treat the history files as actual files , also i added this line $cook = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Cookies") FileDelete($cook & "\*.*") but it doesn't delete all the cookies , i have to put lile this : FileDelete($cook & "\*.txt")
Fire Posted August 30, 2012 Posted August 30, 2012 Hello d4rkdz. Try this and it'll work for you: Run(@ComSpec & " /c RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255",@SW_HIDE); [size="5"] [/size]
d4rkdz Posted August 30, 2012 Author Posted August 30, 2012 Hello d4rkdz. Try this and it'll work for you: Run(@ComSpec & " /c RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255",@SW_HIDE); it's like this : Run(@ComSpec & " /C RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255","",@SW_HIDE); and it shows that the history is being deleted right wich is the same as the line i posted in the op
StringingLong Posted August 30, 2012 Posted August 30, 2012 (edited) RunDll32.exe calls InetCpl.cpl (which is a DLL) on its entry point that has signature similar to: DllMain($hWnd,$hInst,$lpstrCmdline,$nCmdShow) Although Run calls RunDll32 and passes @SW_HIDE, InetCpl.cpl can totally ignore it. InetCpl.cpl wasn't meant to be called from outside apps although Microsoft published some of the calling interfaces to clean cookies, temp files, etc. I remember reading something a while back that using the InetCpl.cpl interface for removing files doesn't always clean up all the files . It has something to do with security mode it is in. WinWait* functions won't work because InetCpl.cpl is running in its own separate process. It can block until it is completely finished, thus making WinWait* calls "too late" and never seeing the InetCpl.cpl window. An option you have is to simulate InetCpl.cpl clean up behavior by locating all temp file locations, cookie folder, etc. and writing your own app. This is probably more hassle than its worth. Besides, whats the big deal if you see a pop up show up? Edited August 30, 2012 by StringingLong
d4rkdz Posted August 31, 2012 Author Posted August 31, 2012 Besides, whats the big deal if you see a pop up show up?it become annoying to the users after a while
Fredricz Posted August 31, 2012 Posted August 31, 2012 (edited) Hey!ICSweep is a perfect tool to use. I didn't find the original download, so I uploaded it to my own FTP... Download:http://fredricz.com/ICSweep.exeParameters: /ALL - Delete both Temporary Internet Files and Temp files /TIF - Delete Temporary Internet Files only (Default) /TMP - Delete Temp files only /SIZE - Report the size of both Temporary Internet Files and Temp files in each profile NOT in use. This switch will also report the total size of both Temporary Internet Files and Temp files NOT in use. It DOES NOT DELETE any files. /? - show this help fileMore info:http://www.ctrl-alt-del.com.au/files/ICSweep.txtICSweep download from Softpedia:http://www.softpedia.com/get/System/System-Miscellaneous/ICSWEEP.shtml Edited August 31, 2012 by Fredricz
bdr529 Posted November 18, 2012 Posted November 18, 2012 dim $ClearID=255 dim $run=Run("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess " & $ClearID) while 1 if ProcessExists ($run) then WinSetState ("[CLASS:#32770]","",@SW_disable) else exitloop endif wend To community goes all my regards and thanks
Masush Posted February 22, 2013 Posted February 22, 2013 dim $ClearID=255 dim $run=Run("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess " & $ClearID) while 1 if ProcessExists ($run) then WinSetState ("[CLASS:#32770]","",@SW_disable) else exitloop endif wend thanks
Trong Posted February 24, 2013 Posted February 24, 2013 Run("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8") Regards,
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