[IE編程] 如何編程清除IE緩衝

來源:互聯網
上載者:User

手動清除IE緩衝(Internet臨時檔案,Cookie,記錄,表單記錄,上網密碼),可以通過“Internet選項”控制台(如)來實現。

 

 

如果想命令列方式來清除IE緩衝,可以使用藉助RunDll32.exe 來運行Internet選項的對應功能。

 

比如:

Temporary Internet Files  (Internet臨時檔案)

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8

Cookies

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2

History (記錄)

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1

Form Data (表單資料)

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16

Passwords (密碼)

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32

Delete All  (全部刪除)

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255

Delete All - "Also delete files and settings stored by add-ons"

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351

 

想通過編程方式清除IE緩衝, 調用Win32 API函數 ShellExecute 或者 CreateProcess 來執行以上的命令列就可以了。

 

例子:

ShellExecute(NULL, _T("open"), _T("rundll32.exe"),  _T("InetCpl.cpl,ClearMyTracksByProcess 4351"), NULL, SW_SHOWNORMAL);

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.