Solved

Files and folder will be deleted after user log off. Windows 2003

Posted on 2006-07-05
9
558 Views
Last Modified: 2008-03-10
Hi,
  Every times a user logs out, is there any way to automatically delete files related to that user inside My Document, Desktop,.... folders ?
Thanks
I run a win 2003 server with 20 XP computers.
 
0
Comment
Question by:therock_80
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 23

Accepted Solution

by:
TheCleaner earned 300 total points
ID: 17046653
You can use the "Shared Computer Toolkit"  found here:  http://www.microsoft.com/windowsxp/sharedaccess/default.mspx

That would do it...but it would basically revert to a "known state" each time it reboots...


Another option would be a logoff script that deletes the files based on what you specify.
0
 
LVL 26

Assisted Solution

by:Pber
Pber earned 100 total points
ID: 17046854
I agree with TheCleaner...

The logoff script deployed via a Domain GPO applied to the users in a logoff script.  

Create a batch file with the following commands (modify to fit your needs):

ECHO y |del %USERPROFILE%\My Docuements\*.*
ECHO y |del %USERPROFILE%\Desktop\*.*

Save with a name you like.
Save this file in a share on server that all the clients can reach

Create a GPO on the domain Apply the GPO to the OU containing the users.  If you are working in a workgroup you can load GPedit.msc on each computer as well and apply configure the GPO in both situation like this.

User Configuration\Windows Settings\Scripts(Logon\Logoff)
Select Logoff and click add
Browse to the file in the share that you just created above
Click OK when finished.

Have the users logoff\logon and test (you may need to do a gpupdate /force).
0
 
LVL 26

Expert Comment

by:Pber
ID: 17047759
I was just thinking... you might want to tweak the batch file a little.  Hide some of the output so users don't really know you are deleting files.

@echo off
echo Perfoming cleanup
ECHO y |del %USERPROFILE%\My Docuements\*.* >  nul
ECHO y |del %USERPROFILE%\Desktop\*.* > nul
0
 
LVL 23

Expert Comment

by:TheCleaner
ID: 17050338
Pber,

While I agree with your scripting, I would caution the author that this will delete EVERYTHING in My docs, including the default folders (my pictures, etc.).  Just a word of caution.



For the author, one more choice I thought of would be to use mandatory user profiles.  That way, even if the user creates files/folders, etc. the mandatory profile will take effect next time they log in, and basically revert back to the original profile without the extra files/folders.  You can get more info here:

http://support.microsoft.com/KB/307800
0
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.

 
LVL 51

Assisted Solution

by:Netman66
Netman66 earned 100 total points
ID: 17050375
If the profiles are set to Roaming, then you can use a GPO to do this:

Computer Configuration>Admin Templates>System>User Profiles :: Delete cached copies of roaming profiles = Enabled.

This will delete the user's local profile everytime they log off.

0
 
LVL 1

Author Comment

by:therock_80
ID: 17061642
For local setting for each computer, how can i only remove things related to the user?
I dont want to remove default applications such as IE and Office on desktop.
0
 
LVL 1

Author Comment

by:therock_80
ID: 17061704
I meant on the previous post that if i dont have server and i just run each computer locally. How can i remove things?
If i use script, i'm fraid that it will delete all default application shotcuts..etc.
I just want to delete file and folder created by user.
0
 
LVL 23

Expert Comment

by:TheCleaner
ID: 17061828
I would look into the shared computer toolkit I said originally.
0
 
LVL 1

Author Comment

by:therock_80
ID: 17062158
Wow this is #1 tool. But do you know which setting enables user access startup programs on taskbar.
Because after using this tool, all startup programs disappeared on taskbar.
I want to access Volume or Antivirus from taskbar  
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Join & Write a Comment

So you have two Windows Servers and you have a directory/folder/files on one that you'd like to mirror to the other?  You don't really want to deal with DFS or a 3rd party solution like Doubletake. You can use Robocopy from the Windows Server 200…
Numerous times I have been asked this questions that what is it that makes my machine log on so slow, there have been cases where computers took 23 minute exactly after taking password and getting to the desktop. Interesting thing was the fact th…
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.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

707 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

12 Experts available now in Live!

Get 1:1 Help Now