Solved

VB Script Delete Temp files and Launch IE

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

752 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