本帖最後由 肥龍 於 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 & "\*.*" |