none
InetCpl.cpl with ClearMyTracksByProcess

    Question

  • Is there a way to use ClearMyTracksByProcess *without* it showing a progress bar of the process?  To somehow have it run in the background? 
    Currently I'm using:
    "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8"
    Also, can someone explain the differences between ClearMyTracksByProcess and ClearMyTracksByProcessW ?  I can't find documents for it anywhere. 
    Help is greatly appreciated.
    Thanks,
    Marcos
    Wednesday, March 19, 2008 4:30 AM

Answers

  • You cannot run it without UI.  The function was exported for IE's consumption, which is why it isn't documented.  The fact that you can use it is a happy side effect and you shouldn't necessarily rely on it since the IE team could change its behavior in the future.

     

    As far as the difference between the two, I think the "ByProcess" version was added to make it work with Low Rights IE.  LoRIE has both a Medium Integrity cache and a Low Integrity cache.  Generally when a user wants to clear one, they really want to clear both.  The "W" version is just the wide character (Unicode) version, as opposed to the "A" version which is ANSI.  Though I don't remember it taking string arguments.

    Wednesday, March 19, 2008 8:15 PM

All replies

  • You cannot run it without UI.  The function was exported for IE's consumption, which is why it isn't documented.  The fact that you can use it is a happy side effect and you shouldn't necessarily rely on it since the IE team could change its behavior in the future.

     

    As far as the difference between the two, I think the "ByProcess" version was added to make it work with Low Rights IE.  LoRIE has both a Medium Integrity cache and a Low Integrity cache.  Generally when a user wants to clear one, they really want to clear both.  The "W" version is just the wide character (Unicode) version, as opposed to the "A" version which is ANSI.  Though I don't remember it taking string arguments.

    Wednesday, March 19, 2008 8:15 PM
  •  

    I found some information about InetCpl, I put all of it to the batch file as below

     

    echo Clear Temporary Internet Files:
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8


    echo Clear Cookies:
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2


    echo Clear History:
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1


    echo Clear Form Data:
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16


    echo Clear Saved Passwords:
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32


    echo Delete All:
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255


    echo Delete All w/Clear Add-ons Settings:
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351

     

    Hope it help

    Monday, September 22, 2008 5:41 AM
  • My environment is Windows Vista Business, and IE7.  All updated with the most recent patches.

    I've tried using "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1" to clear the history.  Both in an elevated and un-elevated command prompt.

    Here's what I've noticed:

    1.  run it with IE closed.  Open an IE and then examine the history. - Result is nothing is cleared.  All the history remains
    1.  run it with IE open and the history tabbed displayed.  - Result is the history is cleared, UNTIL you close and restart IE.  When IE is re-opened, all the previous history is visible once again, and nothing appears to have been removed.

    Apparently this has broken somewhere along the way of the all the other patches being laid down.  However, i would consider this a a secure hole to have a security feature execute without returning any error, but failing to do its job.

    Please investigate and fix.

    Monday, December 29, 2008 10:06 PM
  •  

    I found some information about InetCpl, I put all of it to the batch file as below

     

    echo Clear Temporary Internet Files:
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8


    echo Clear Cookies:
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2


    echo Clear History:
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1


    echo Clear Form Data:
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16


    echo Clear Saved Passwords:
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32


    echo Delete All:
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255


    echo Delete All w/Clear Add-ons Settings:
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351

     

    Hope it help

    With which versions of IE does it works?
    Friday, November 27, 2009 10:16 PM
  • I have no further information to contribute.
    Friday, August 27, 2010 9:54 PM
  •  

    the 1st option will clear the history every one here is having problems with.

    copy and past whats below into notepad rename .txt to .bat

     

    @echo off
    ::Created by acem77 8/31/10

    ::only tested on IE7
    ::

    :home
    cls
    COLOR 2e
    echo Delete IE7 History tool
    echo Please select the task you wish to run.
    echo Pick one:
    echo.
    echo  1. Delete Non-trusted web History(low level hidden clean up)
    echo  2. Delete History
    echo  3. Delete Cookies
    echo  4. Delete Temporary Internet Files
    echo  5. Delete Form Data
    echo  6. Delete Stored Passwords
    echo  7. Delete All
    echo  8. Delete All "Also delete files and settings stored by add-ons"
    echo  9. EXIT
    :choice
    Echo Hit a number [1-9] and press enter.
    set /P CH=[1-9]

    if "%CH%"=="1" set x=del /s /q C:\Users\%username%\AppData\Local\Microsoft\Windows\History\low\* /ah
    if "%CH%"=="2" set x=RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1
    if "%CH%"=="3" set x=RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2
    if "%CH%"=="4" set x=RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
    if "%CH%"=="5" set x=RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16
    if "%CH%"=="6" set x=RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32
    if "%CH%"=="7" set x=RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255
    if "%CH%"=="8" set x=RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351
    if "%CH%"=="9" goto quit

    %x%


    goto Home


    ::Temporary Internet Files > Delete files - To delete copies of web pages, images, and media
    ::that  are saved for faster viewing.
    ::Cookies > Delete cookies - To delete cookies, which are files stored on your computer by
    ::websites to save preferences such as login information.
    ::History > Delete history - To delete the history of the websites you have visited.
    ::Form data > Delete forms - To delete all the saved information that you have typed into
    ::forms.
    ::Passwords > Delete passwords - To delete all the passwords that are automatically filled in
    ::when you log on to a website you've previously visited.
    ::Delete all - To delete all of the above in one operation.


    ::enter below in search/run to see Low  history dir if exists
    ::C:\Users\%username%\AppData\Local\Microsoft\Windows\History\low

    ::Delete all low(untrusted history) very hidden
    ::this will clean any unlocked  files under the dir and not delete the dir structure
    ::del /s /q low\* /ah ::del /s /q C:\Users\%username%\AppData\Local\Microsoft\Windows\History\low\* /ah

    Friday, September 17, 2010 3:44 AM
  • Very nice script acem77, many thanks! --gront
    Saturday, October 30, 2010 3:12 PM
  • will this work with IE6 as well?
    Wednesday, December 01, 2010 3:08 PM
  • In my version (IE 8.0 Windows 7 x64) Process Exporer shows that IE use 2 commands (It starts 2 processes).

    "rundll32.exe C:\Windows\system32\inetcpl.cpl,ClearMyTracksByProcess 2299 487 115"

    "rundll32.exe C:\Windows\system32\inetcpl.cpl,ClearMyTracksByProcess 6395 487 115"

    Monday, December 27, 2010 12:37 AM
  • No dude it won't work.

    I did tried to test it with IE but it failed.

    Thursday, September 29, 2011 1:48 PM
  •  

    I found some information about InetCpl, I put all of it to the batch file as below

     

    echo Clear Temporary Internet Files:
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8


    echo Clear Cookies:
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2


    echo Clear History:
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1


    echo Clear Form Data:
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16


    echo Clear Saved Passwords:
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32


    echo Delete All:
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255


    echo Delete All w/Clear Add-ons Settings:
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351

     

    Hope it help


    You can also add the numbers together to do more then 2 things in one command. Do you know the number for "delete internet cache"?
    Saturday, April 05, 2014 10:59 PM