Home » Microsoft TechnologiesRSS

InetCpl.cpl with ClearMyTracksByProcess

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
 

8 Answers Found

 

Answer 1

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.

 

Answer 2

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

 

Answer 3

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.

 

Answer 4

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?
 

Answer 5

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.


Could you give more detailed description? I followed it but it does not work, why? I encountered the same problem.
 

Answer 6

I have no further information to contribute.
 

Answer 7

 

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

 

Answer 8

Very nice script acem77, many thanks! --gront
 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter