Solved

VB Script Delete Temp files and Launch IE

Posted on 2007-12-06
2
873 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
In this article we want to have a look at the directory attributes which are used by Microsoft to store the so called Security Identifiers (SID). These SIDs plays an important role in delegating and granting permissions and in authentication of trus…
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…

861 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