02-24-2012, 06:49 AM
Recently i face this question in an interview, write a script to delete cookies..
help me to know the script..
thanks for every help
help me to know the script..
thanks for every help
|
script for deleting cookies
|
|
02-24-2012, 06:49 AM
Recently i face this question in an interview, write a script to delete cookies..
help me to know the script.. thanks for every help
02-24-2012, 10:35 AM
Hi,
Try the below code. Code: Function ClearCookies()
On Error Resume Next
Const TEMPORARY_INTERNET_FILES = "&H20&"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(TEMPORARY_INTERNET_FILES)
objFSO.DeleteFile(objFolder.Self.Path & "\*.*")
sPath = objFSO.GetFolder(objFolder.Self.path) & "\Content.IE5\"
Set objFolders = objFSO.GetFolder(sPath)
For Each objFName In objFolders.SubFolders
WScript.Echo sPath & objFName.Name
objFSO.DeleteFolder(sPath & objFName.Name)
Next
If Err.Number <> 0 Then
err.Clear
ClearCookies = 0
Else
ClearCookies = 1
End If
End FunctionRegards, Ankesh
02-24-2012, 10:41 AM
02-24-2012, 11:58 AM
webutil.deletecookies
02-24-2012, 07:33 PM
(This post was last modified: 02-24-2012, 07:43 PM by mrajeshtnl.)
Thank you Ankesh
Thank you Ravi Thank you, Inborntester, thanks for awareing me to search for my question insted posting a thread, from the next time onwards, before i post a question, i will search in the site... Thank you every one
03-06-2012, 12:36 AM
Code: webutil.deletecookies
Set WshShell = CreateObject("WScript.Shell")
WshShell.run "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351" |
|
« Next Oldest | Next Newest »
|