Policy or Logoff Script to delete local profiles

Posted on 2006-04-27
Last Modified: 2008-01-09
We have several internet stations in our company which can be used by everybody. The problem we have now is that after a few weeks, the HDD is at 100% capacity because of the local profiles and its temporary internetfiles.

Is there a way to create a OU or Logoff script which deletes the profile used again  so that only All users, Default User are left after logoff ?
Question by:Cassavatech
    LVL 10

    Accepted Solution

    You can use the delprof utility in the Windows 2003 Resource Kit or Remote Profile Cleaner:

    Remove Profile Cleaner:


    LVL 44

    Expert Comment

    Most of this is taken up in temporary files.  You can set internet explorer to kill all the files on exit, Tools Internet options, all the way at the bottom, security, empty temporary internet files when browser is closed, then you set every person to login as guest, with no password, and you will never have the problem again.  If you want separate logins, it must be because of repeat people, and if so, why delete their profiles?  Just get rid of the temp files and you are done.
    LVL 3

    Expert Comment

    If you choose to clear the internet files on browser close and want to change it for every user/computer in a group via script, the registry setting is:
    >>Quoted from somewhere
    You can also use the registry to configure IE to empty the Temporary Internet Files folder upon exiting the browser by performing the following steps:

       1. Start a registry editor (e.g., regedit.exe).
       2. Navigate to the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache registry subkey.
       3. Double-click Persistent, set its value to 0, then click OK.
       4. Close the registry editor, then start IE for the change to take effect.

    If it's a registry key, you can script it.

    Delprof has the ability to scrap profiles older than xx days.
    DELPROF /q /i /d: 15

    the 15 is 15 days

    You should already have a good login script (or batch file) that this can be plugged in to periodically or every time.
    LVL 3

    Expert Comment

    p.s.  I just elaborated on vic's and scrath's solutions...

    You don't want to delete the profile directories without the tool delprof as this might screw up group policies...just in case you were thinking of giving that a try.

    By default, this program installs into C:\Program Files\Windows Resource Kits\Tools
    LVL 2

    Author Comment

    delprof.exe is what I needed, thanks :)

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Introduction Often we come across situations wherein our batch files would be needing to reboot Windows for a variety of reasons. A few of them would be like: (1) Setup files have been updated whose changes can take effect only after a reboot …
    Many people tend to confuse the function of a virus with the one of adware, this misunderstanding of the basic of what each software is and how it operates causes users and organizations to take the wrong security measures that would protect them ag…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    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