Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VB Script Delete Temp files and Launch IE

Posted on 2007-12-06
2
Medium Priority
?
879 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 2000 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

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Suggested Courses

971 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