开发者

Deleting IE6 cookies programmatically

开发者 https://www.devze.com 2023-03-28 04:29 出处:网络
Is there a way to delete IE6 cookies programaticaly?I have come across solutions for IE7 and IE8 using something like RunDll32.exe InetCpl.cpl,ClearMyTracksByProc开发者_运维问答ess 2 but this does not

Is there a way to delete IE6 cookies programaticaly? I have come across solutions for IE7 and IE8 using something like RunDll32.exe InetCpl.cpl,ClearMyTracksByProc开发者_运维问答ess 2 but this does not work for IE6. I've tried a simple batch file to delete the contents of temporary internet files folder but that fails due to some files being in use.


The proper way to do this is to use the WinINET cache enumeration functions (FindFirstUrlCacheEntry, FindNextUrlCacheEntry) to enumerate the cookie store, then call DeleteUrlCacheEntry on each cookie.

http://support.microsoft.com/kb/326201 has a related code sample to get you started.

There are many command line utilities that will do this if you're just looking for a scriptable solution and don't actually need to integrate the code into some larger project...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号