Jump to content

Recommended Posts

Posted

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

Posted

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

Posted

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 & "*.*")
Posted

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")
Posted

Hello d4rkdz.

Try this and it'll work for you:

Run(@ComSpec & " /c RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255",@SW_HIDE);

[size="5"] [/size]
Posted

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

Posted (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 by StringingLong
Posted (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.exe

Parameters:

/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 file

More info:

http://www.ctrl-alt-del.com.au/files/ICSweep.txt

ICSweep download from Softpedia:

http://www.softpedia.com/get/System/System-Miscellaneous/ICSWEEP.shtml

Edited by Fredricz
  • 2 months later...
Posted

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

  • 3 months later...
Posted

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

:thumbsup:

thanks

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...