Solved

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

Posted on 2006-07-05
9
564 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
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
 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

623 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