2013-03-21 91 views

回答

1

看看這個,你可以通過從臨時Internet文件夾刪除它們清除個人資料:

http://www.f-prot.com/support/windows/fpwin_faq/96.html

+0

是的謝謝,但我只需要dos命令不手動 – Bourkadi 2013-03-21 14:22:06

+0

該鏈接也有一個小批處理腳本太..完全檢查出來。你只需要使用DEL%PATH_TO_FOLDER%命令 – DntFrgtDSemiCln 2013-03-21 14:23:02

+0

我認爲這只是爲IE,不適用於任何瀏覽器 – Bourkadi 2013-03-21 14:25:17

6

這裏有一個批處理腳本清除Cookie,緩存和歷史在所有主流瀏覽器中。它需要一些測試,因爲它可能會刪除偏好設置或某些您不想刪除的內容。強烈建議大家注意!

@echo off 
setlocal 

Echo Clearing cache, cookies and history for: 


:: ------------- 
:: Google Chrome 
:: ------------- 
pushd "%LOCALAPPDATA%\Google\Chrome\User Data\Default" 2>NUL && (

    set /p "=* Google Chrome... "<NUL 
    call :kill chrome 

    for /f "delims=" %%I in (
     'dir /b ^| find /v /i "bookmarks" ^| find /v /i "extension" ^| find /v /i "preferences"' 
    ) do (
     if exist "%%~fI\" (
      rmdir /q /s "%%~fI" 
     ) else del /f "%%~fI" >NUL 
    ) 

    popd 
    echo Done. 
) 


:: ------- 
:: Firefox 
:: ------- 
pushd "%LOCALAPPDATA%\Mozilla\Firefox\Profiles" 2>NUL && (

    set /p "=* Firefox... "<NUL 
    call :kill firefox 

    for /f "delims=" %%I in ('dir /b /s /ad *cache* 2^>NUL') do (
     if exist "%%~fI" rmdir /q /s "%%~fI" 
    ) 

    popd 
    pushd "%APPDATA%\Mozilla\Firefox\Profiles" 2>NUL && (

     for %%I in (history.dat formhistory.dat downloads.rdf cookies.txt) do (
      for /f "delims=" %%x in ('dir /b /s /a-d %%I 2^>NUL') do (
       if exist "%%~fI" del /f "%%~fI" >NUL 
      ) 
     ) 
     for /f "delims=" %%I in ('dir /b /s /ad *cache* 2^>NUL') do (
      if exist "%%~fI" rmdir /q /s "%%~fI" 
     ) 
     popd 
    ) 

    echo Done. 
) 


:: ----- 
:: Opera 
:: ----- 
pushd "%APPDATA%\Opera\Opera\" 2>NUL && (
    set /p "=* Opera... "<NUL 
    call :kill opera 
    for %%I in (history cookie session) do (
     for /f "delims=" %%x in ('dir /b "*%%I*" 2^>NUL') do (
      if exist "%%~fx\" (
       rmdir /q /s "%%~fx" 
      ) else del "%%~fx" 
     ) 
    ) 
    popd 
    pushd "%LOCALAPPDATA%\Opera\Opera\" 2>NUL && (
     for /d %%I in (*cache) do rmdir /q /s "%%~fI" 
     for /d %%I in (*temp*) do rmdir /q /s "%%~fI" 
     popd 
    ) 
    echo Done. 
) 


:: ------ 
:: Safari 
:: ------ 
pushd "%APPDATA%\Applec~1\Safari" 2>NUL && (
    set /p "=* Safari... "<NUL 
    call :kill safari 
    rmdir /q /s "%LOCALAPPDATA%\Applec~1\Safari" 2>NUL 
    for /f "delims=" %%I in (
     'dir /b ^| find /v /i "bookmark" ^| find /v /i "configuration"' 
    ) do (
     if exist "%%~fI\" (
      rmdir /q /s "%%~fI" 
     ) else del "%%~fI" 
    ) 
    echo Done. 
) 


:: ----------------- 
:: Internet Explorer 
:: ----------------- 
set /p "=* Internet Explorer... "<NUL 
call :kill iexplore 
>NUL (
    set History=%LOCALAPPDATA%\Microsoft\Windows\History 

    if exist "%History%" (
     del /q /s /f "%History%" 
     rd /s /q "%History%" 
    ) 

    set IETemp=%LOCALAPPDATA%\Microsoft\Windows\Tempor~1 

    if exist "%IETemp%" (
     del /q /s /f "%IETemp%" 
     rd /s /q "%IETemp%" 
    ) 

    set Cookies=%APPDATA%\Microsoft\Windows\Cookies 

    if exist "%Cookies%" (
     del /q /s /f "%Cookies%" 
     rd /s /q "%Cookies%" 
    ) 

    reg delete "HKCU\Software\Microsoft\Internet Explorer\TypedURLs" /va /f 2>NUL 
) 
echo Done. 


:: ------------- 
:: Flash Cookies 
:: ------------- 
set /p "=* Flash Player... "<NUL 
set FlashCookies=%APPDATA%\Macromedia\Flashp~1 

>NUL (
    if exist "%FlashCookies%" (
     del /q /s /f "%FlashCookies%" 
     rd /s /q "%FlashCookies%" 
    ) 
) 
echo Done. 

goto :EOF 

:kill 
taskkill /im "%~1.exe" >NUL 2>NUL 
set "task=%~1" 
:killwait 
for /f "tokens=2 delims==" %%I in ('wmic process where "name like \"%%%task%%%\"" get name /format:list 2^>NUL') do (
    ping -n 2 0.0.0.0 >NUL 
    goto killwait 
) 
goto :EOF 

How to delete cookies, cache and history in all major browsersMozillaZine Forums,和我的想象鬆散的基礎上的信息。

+0

非常好的解決方案!特別是在刪除之前殺死瀏覽器似乎很重要,但我只能在這個解決方案中看到它!謝謝! – Jeff 2013-11-10 13:14:24

2

您可以通過調用InetCpl.cpl RunDll32兼容導出功能ClearMyTracksByProcess來刪除Cookie。

刪除Cookie撥打:

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2 

要刪除記錄,通話:

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8 

刪除所有內容,請撥打:

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255 

要刪除歷史記錄,cookies和緩存電話:

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 43

提示:只需添加數字即可使其在一個命令中執行2個或更多的操作。