Saturday, November 9, 2013

Delete Cookies

Methods related to cookies:
  • WebUtil.Addcookie
  • WebUtil.Deletecookie
  • WebUtil.Deletecookies 'deletes all cookies in the system
  • WebUtil.Getcookies

Delete cookies using Windows shell object:

SysUserName=Environment.Value("UserName")
Set ShellObj=CreateObject("WScript.shell")
ShellObj.run("cmd /C cd C:\Documents and Settings\" & SysUserName & "\Cookies & del *.txt")
Set ShellObj=nothing

The above two methods works only with IE browsers.

No comments:

Post a Comment