Logoff Script to clear cache and IE temp files

Posted on 2007-07-26
Last Modified: 2012-05-05
Can anyone help me create a  script?a  new batch file or script that will automatically delete  all the files created inside the Temporary Internet folders and cahce of the current user when he/she log off.
Question by:jaydeeoseph
    LVL 11

    Expert Comment

    check out this one.
    del /Q C:\WINDOWS\Temp
    You can use GP to remove temporary internet files, but you will need to have the settings in preference mode. On the GP, Under User Configuration->Windows Settings->Internet Explorer Maintenance (you need to right click, and put in Preference Mode)->Advanced

    Hope this helps
    LVL 26

    Accepted Solution

    Try this one:

    del "%temp%\*.*" /s /q /f
    del "%tmp%\*.*" /s /q /f
    rd "%userprofile%\Local Settings\History\History.ie5" /s /q
    del "%userprofile%\Cookies\*.*" /s /q /f
    rd "%userprofile%\Local Settings\Temporary Internet Files\content.ie5" /s /q



    Author Comment


    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    by Batuhan Cetin Within the dynamic life of an IT administrator, we hold many information in our minds like user names, passwords, IDs, phone numbers, incomes, service tags, bills and the order from our wives to buy milk when coming back to home.…
    ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    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.

    729 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

    20 Experts available now in Live!

    Get 1:1 Help Now