Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2006-07-05
9
Medium Priority
?
565 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 1200 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 400 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
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…
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 …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

660 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