• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 252
  • Last Modified:

Have all local data erased for domain users..

We have a number of workstations each being used by a large number of domain users.  The computers have limited disk capacity and we want all local data (user profile with temporary internet files etc) to be erased from the workstation disk when the user logs off.

There is a couple to GPO entries to ensure this, but we have not had any success to get these to work as described.

What do we need to do to ensure users' local data is erased when logging off?
0
geir056
Asked:
geir056
  • 2
  • 2
  • 2
  • +2
1 Solution
 
Zuhir ElgmatiApplications and Systems AdministratorCommented:
there's  a software called deep freeze do something like this, acually i'm not sure but i remmber that i use it from along time befor it's work as a cleaner, when the user log off it's automatically remove every thing , temporary + new files ..etc
http://www.faronics.com/html/deepfreeze.asp

good luck
0
 
Mark DamenERP System ManagerCommented:
In your GPO, have you set the following settings:

Computer Configuration \ Administrative Templates \ System \ User Profiles \ Delete Cached Copies or Roaming Profiles

User Configuration \ Administrative Templates \ System \ User Profiles \ Delete Cached Copies or Roaming Profiles

?

And do the GPO apply to the OU of the users/computers you are trying to target, check the permissions on the GPO and any filtering to ensure it is taking effect.
0
 
MeviCommented:
If you're not using roaming profiles or folder redirection, you could design a startup script that deletes files out of each profile (or delete the profiles themselves...to delete the whole profile you want to make sure it is a STARTUP script, because many times the user profile is locked even after a logout.)

Here is an exmaple that will clear temporary internet files only

Set this as a logon or logoff script.




Const TEMPORARY_INTERNET_FILES = &H20&

Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(TEMPORARY_INTERNET_FILES)
Set objFolderItem = objFolder.Self
strPath = objFolderItem.Path & "\*.*"

Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile(strPath)
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
geir056Author Commented:
Hi,
To markus*

There is no Delete Cached Copies or Roaming Profiles entry in User Config, only in Computer Config, which of course is set.

We are just allowing Local profiles (no roaming) and we just want to keep each  users' disk space as low as possible after they have logged off.  Can someone confirm that the Computer Config.'s "Delete Cached Copies or Roaming Profiles" is supposed to work in a Local profiles only environment?

As of deleting the profile completely I ask myself if that will cause a significant delay at each logon as there is certainly a number of files and folders to be created.  Can someone comment on that?

Basically the bulk of (big) files which causes problems are the temporary internet files and downloaded updates in the <user>\Program data folders.  Would it be preferable to just erase these two folders..?

Thank again for some comments here

Geir
0
 
Mark DamenERP System ManagerCommented:
Oh yeah, that changes the goalposts.  The delete cached copies will ONLY work for roaming profiles.  Your definately just need a script to delete those particular files.  I take it MY DOCS is redirected to a network share each time?  And Outlook setttings would also be wiped if u delete whole profile.
0
 
geir056Author Commented:
OK, so I should go for Mewi's suggestion:

Const TEMPORARY_INTERNET_FILES = &H20&
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(TEMPORARY_INTERNET_FILES)
Set objFolderItem = objFolder.Self
strPath = objFolderItem.Path & "\*.*"
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile(strPath)

How do I extend this to also go for all files in Local Settings\Temp while being forgiving about locked files and not stop but continue to erase the next unlocked file..?

regards Geir
0
 
MeviCommented:
I'm just a light scripter (infact I grabbed that example from the script center) but I'd wager to say adding "On Error Resume Next" would take care of that.

You can modify that script to have the Temp path (I couldn't find the temp constant documented, so you'll likely have to expand the environmental variables)


Try this below (I haven't tested this)
On Error Resume Next
Set WshShell = CreateObject("WScript.Shell")
Set objEnv = WshShell.Enviroment("Temp")
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile(objEnv)

Open in new window

0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now