Clearing IE Cache with Group Policy In Effect

Posted on 2006-04-25
Last Modified: 2012-06-27
Just wondering is anyone has a script or small util or tips that can be run to allow me to clear my IE cache when I run it in either XP or Win2k

There is a group policy in effect preventing access to IE tools settings etc and also preventing any software installations

Question by:GazBe
    LVL 7

    Expert Comment

    open Explorer
    new text document
    open it
    write down following, except my comments:

    d: - partition where IE cache resides, replace with your partition
    cd D:\Work_fol\Temporary Internet Files - cd followed by the path
    del /f /s /q *.*

    change its extension in .bat (by example: delete.bat)
    and run it.
    If you get stuck give me the path of XP and w2k caches and i'll write the exact "code" (or send you the file)
    LVL 7

    Expert Comment

    Heh, thats pretty cryptic
    Using the Windows Explorer:
    Go into C:\Documents and Settings\GazBe\Local Settings\Temporary Internet Files

    and manually delete everything you want.   Some people like to keep their "Cookie" files...some don't.

    alternately, as Visual3D mentioned, use a batch file:

    del /f/s/q "C:\Documents and Settings\GazBe\Local Settings\Temporary Internet Files"

    (Somewhat simpler version)

    Author Comment

    I know the path so I could delete manually but Ideally I'm looking for a batch file

    My path is  - C:\Documents and Settings\Gary\Local Settings\Temporary Internet Files\

    I have tried those suggested above but no luck - the first time they are run they swcript seems to be doing something (probably attempting to delete - it's going to fast to see what's being said in the cmd window)

    No files are deleted though!

    This has nothing to do with any policy as I'm testing this on a standard login with no group policies being applied - I had tried similar before myself but had no luck so that's why I'm here

    any ideas?

    LVL 7

    Accepted Solution

    The index.dat file won't release until all copies of explorer and Internet Explorer are closed, so the "Folder" looks full, but the actual underlying
    filesystem has indeed been deleted.  Logout and log back in again to verify.

    LVL 7

    Expert Comment

    If you log in as a standard user, i see no problem.
    There are a few file system that do not need to be deleted, also the hidden ones won't be. They are small size anyway.
    Copy and paste this to a .bat file and run it twice.

    cd C:\Documents and Settings\Gary\Local Settings\Temporary Internet Files
    del /f /s /q *.*

    What message have you got second time?
    What size is your Temporary Internet Files folder? Copy the size from properties.

    Author Comment

    Visual3dmaya - sorry for the delay in getting back to you

    Taking in the comments above I have also logged out and back in and even rebooted

    1st of all running the script appears to say it's deleting all files
    running it a 2nd time shows many less in use and those remaining it says can not be deleted as there are in use.

    Then when I look in the directory there seems to be no change with 10,000 plus files

    However, right clicking properties of the directory says  only 6mb in size with 29 files and 26 folders !

    Looking in the directory there never were any folders!!

    I'm puzzled by all this

    checking the path via internet tools is correct and using the delete temp files via internet tools empties the directory I have been trying to empty via the script

    Can I just add that the above details are taken from my XP Pro system but similar effects from trying this at work on win2k with the odd path tweak etc

    LVL 7

    Assisted Solution

    Try running the script (without pause) right after boot - pressing "shift" during the boot not to load from startup - and see whether the cache has decreased.
    Cookies by example are not deleted and you don't have to delete the system files. They don't take much and need to be there for OS you are in. In the end cache size matters. Also to delete the cookies can be done.

    If you can install another browser i can recommend one more customable regarding not only cache. If you can't install, don't read this:
    You can make Opera your default browser and store all passwords.
    It has an cookie and account manager where you edit, delete every web account, list, sort them or you can have more than one per site, by ex multiple accounts in yahoo, when enter the page you can select from a list.
    Opera don't use IE cookies nor viceversa. Opera store its cookies in the file named cookies4.dat located in ...\Opera\profile. That was one of the reasons i mentioned above to make Opera the default browser. If you don't register you'll have a small banner on top of the screen.
    All accounts must be stored in wand.dat
    In Opera you'll have some very intristing features that didn't meet elsewhere.
    The coolest features (except Mouse gestures)
    very important link: when you upgrade to a new version of Opera or else.
    I recommend to not install it with separate user settings, will be harder when you backup your Opera files.
    This way you can install Opera at any location, on any partition or harddisk you want.
    "If your system does not support multiple users or you chose to not install Opera with separate user settings, all files and directories are located in the profile directory, which is a sub-directory of your Opera installation directory."

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    How many times have you been browsing the internet, with multiple tabs open, and closed the wrong one? Have you ever clicked 'Close all tabs' instead of 'Close current tab' ? Internet Explorer 8 now brings to you, what Firefox has had for a wh…
    This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
    Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
    This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

    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

    18 Experts available now in Live!

    Get 1:1 Help Now