Here's another method that also doesn't need batch files, delprof, GPO's or commercial utility's, but i haven't verified this method myself:
If you want cached profiles to be deleted automatically, add a REG_DWORD value named DeleteRoamingCache to HKLM\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\W inlogon. Give it a value of 1 to enable removal, or 0 to allow cached profiles to stay around.
I've only come across one issue during testing so far, when a user logs out it removes the profile, then 10seconds later it reappears but the only thing that is in there is "local settings > application data" and it's empty, the next time that same user logs in it creates a folder "user.DOMAIN" (where the username is user and your domain is domain etc) and when the user then logs out that folder is removed completely but still leaving the original empty user folder
Anyone come across this yet? not much of a problem as it's only 0 bytes but would be nice to have it gone
Hi There is it possible to grab a copy of the script from you.
I've got a GPO setting to delete the temp IE files, not sure if this and the profile removal are clashing or if it's something else...
I recently started using script written by Joe Shonk to replace the function of the Delprof.exe tool and so far am happy to report it works like a charm. It allows a lot of customization, which is nice.
Here is the link to the script with all the details and instructions
The Shonk Project - Delete Profiles Script v1.9
Here is a link that describes a good way to use this script locally if you don't use active directory
J House Consulting / Script to replace Delprof.exe
I use Active Directory and run the deleteprofiles.vbs script at the machine startup via Group Policy and I also use Microsoft's UPHClean to ensure all users profiles are unloaded just in case.
Overall this method has worked best for me.
I'm having a play with the Shonk script at the moment but I can't get it to run as a startup script, i've got a .bat file in netlogon along with the .vb file. I can run it by pasting the command in to the cmd prompt or by double clicking it.
This is the command that i'm running. Should I need to call it from a .bat file or am I barking up the wrong tree?
Thanks.Code:cscript.exe %logonserver%\NETLOGON\DeleteProfiles.vbs /E root,libraryuser /D 2 /R /L C:\delprof.log
p.s I know i've got the read only switch set
I had an issue like this once and it turned out to be the permissions on the .bat itself! - maybe worth a check?
Last edited by cookie_monster; 2nd March 2010 at 09:23 AM.
You may find that the GPO to delete cached profiles will not work if for instance a child pulls the power from a computer when they are still logged on.
Is anyone using the Shonk Delete Profiles Script v1.9?
I've been trying it and every part seems to work well except the delete part (shame that). I've set it to log and it runs through the reghives then selects profiles that can be deleted it then says "Deleting Orphaned Profile Directory: C:\Documents and Settings\USERNAME" in the log but when I check the folder is still there. I can manually delete the folder so it doesn't seem to be a permissions issue.
If you're running this as a logon/logoff script then it will run with the permissions of the user account.
In that case it's much better to run it as a startup or shutdown script (we do shutdown) as that will run with system account permissions.
Sorry if this is stating the obvious.
There are currently 1 users browsing this thread. (0 members and 1 guests)