Solved

VB Script Delete Temp files and Launch IE

Posted on 2007-12-06
2
876 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction During my participation as a VBScript contributor at Experts Exchange, one of the most common questions I come across is this: "I have a script that runs against only one computer. How can I make it run against a list of computers in …
Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

626 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