locked
Using VBScript to clear internet browser history, cookies and temp files

    Question

  • Hi

     

    I'd like to automate in VBScript the deletion of Cookies, Files and Clear History for Internet Explorer.

     

    Does anyone have an idea of how to go about doing this.

     

    Thanks

     

    Sumeet

    Thursday, January 10, 2008 3:47 PM

Answers

All replies

  • Sumeet,

    You landed on the wrong forum...

    This forum is on Microsoft Identity Lifecycle manager...

     

    For Internet explorer better start at :  

    http://www.microsoft.com/technet/community/newsgroups/desktoppt/ie.mspx

     

    Search the net for : vbscript +DeleteUrlCacheEntry +FindFirstUrlCacheEntry

    or 'VBScript +delete +internet cache'

    You'll find pretty useful samples.

     

    HTH,

    Peter

    Thursday, January 10, 2008 10:06 PM
  • Dim temp
    Set fso = CreateObject ("Scripting.FileSystemObject")
    Set winsh = CreateObject ("Wscript.Shell")
    Set temp = fso.GetFolder (winsh.ExpandEnvironmentStrings("%TEMP%"))
    On Error Resume Next
    For each ofile in temp.Files
    fso.DeleteFile ofile
    next
    For Each osubfldr in temp.subfolders
    fso.DeleteFolder (osubfldr),true
    next
    wscript.quit


    just try this for deleting temp files..
    Thursday, January 15, 2009 4:35 AM