Solved

VB Script Delete Temp files and Launch IE

Posted on 2007-12-06
2
872 Views
Last Modified: 2008-02-01
guys can you help with a script.  Im pretty clueless when it comes to this.  I have a script below that runs IE ,

what I want is before IE runs to delete the temporty internet files and cookies of the user that is logged in.  Can someone please help!  
strCommand = """C:\Program Files\Internet Explorer\IEXPLORE.EXE"" -new ""http://"abc.org:8004/idxwf/"""
MsgBox strCommand
objShell.Run strCommand, 1, True
MsgBox "Done"

Open in new window

0
Comment
Question by:dbguy2626
2 Comments
 
LVL 12

Accepted Solution

by:
chandru_sol earned 500 total points
ID: 20421682
Try this script above your script.....

regards
Chandru
et fso = CreateObject("Scripting.FileSystemObject")
    Set WshShell = CreateObject("WScript.Shell") 
    Set oFolder = fso.GetFolder(WshShell.ExpandEnvironmentStrings("%TEMP%"))
    For Each oFile In oFolder.files
        fso.DeleteFile oFile
 
    Next
 
    For Each oSubFolder In oFolder.SubFolders
 
        Call KillSubFolders (oSubFolder)
 
    Next
 
        MsgBox "Done"
 
    Sub KillSubFolders (SubPath)
    fso.DeleteFolder SubPath
    End Sub 

Open in new window

0
 

Author Comment

by:dbguy2626
ID: 20422392
thank you!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Script to copy or move mouse-selected collection of files plus targets referenced by shortcuts (.lnk) The purpose of this article is to help illuminate the real challenges and options available (where they may exist) for utilizing simple scriptin…
Hello again, all.  For those of you that have been following along, you'll know that this is my third article on this topic (though it is not Part III).  This article is sort of remedial, and probably the topic with which I should have started the s…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

805 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question