Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
script for deleting cookies
#1
Recently i face this question in an interview, write a script to delete cookies..

help me to know the script..

thanks for every help
Reply
#2
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 Function

Regards,
Ankesh
Reply
#3
https://www.learnqtp.com/how-to-delete-c...-a-script/
Reply
#4
webutil.deletecookies
Reply
#5
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
Reply
#6
Code:
webutil.deletecookies Set WshShell = CreateObject("WScript.Shell") WshShell.run "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)