InPowerS.Net

 找回密碼
 註冊
搜索
查看: 2274|回復: 0

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

[複製鏈接]
發表於 2008-12-26 13:00:32 | 顯示全部樓層 |閱讀模式
本帖最後由 肥龍 於 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 & "\*.*"
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

小黑屋|Archiver|手機版|InPowerS.Net

GMT+8, 2025-5-9 12:39

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回復 返回頂部 返回列表