肥龍 發表於 2008-12-26 13:00:32

如何用 VB.Net 寫程式刪除 IE 的暫存檔 及 Cookies

本帖最後由 肥龍 於 2008-12-26 13:09 編輯

Dim objShell As Object
Dim strCookiesPath As String
Dim strTmpPath As String

' 使用 Shell 物件的 Application 類別來取得 IE Temp File & Cookies 存在路徑
objShell = CreateObject("Shell.Application")

strTmpPath = objShell.Namespace(&H20).Self.Path ' TEMPORARY_INTERNET_FILES
strCookiesPath = objShell.Namespace(&H21).Self.Path ' COOKIES

Kill (strTmpPath & "\*.*")
Kill (strCookiesPath & "\*.TXT")' 或
Kill strCookiesPath & "\*.*"
頁: [1]
查看完整版本: 如何用 VB.Net 寫程式刪除 IE 的暫存檔 及 Cookies