Solved

VB Script Delete Temp files and Launch IE

Posted on 2007-12-06
2
869 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
Comment Utility
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
Comment Utility
thank you!
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Welcome to part one of a multi-part tutorial series, VBScript for Windows System Administrators.  The goal of this series is to teach non-programmers how to write useful VBS code to automate their environment, and perform tasks faster, and in a more…
Unlike scripting languages such as C# where a semi-colon is used to indicate the end of a command, Microsoft's VBScript language relies on line breaks to determine when a command begins and ends. As you can imagine, this quickly results in messy cod…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now