Solved

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

Posted on 2006-07-05
9
562 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Organizations create, modify, and maintain huge amounts of data to help their businesses earn money and generally function.  Typically every network user within an organization has a bit of disk space to store in process items and personal files.   …
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

730 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