Solved

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

Posted on 2006-07-05
9
559 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

I have never ceased to be amazed how many problems you can encounter on a fresh install of a Windows operating system.  This is certainly case in point& Unable to complete ANY MSI installation.  This means Windows Updates are failing and I can't …
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…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

895 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

13 Experts available now in Live!

Get 1:1 Help Now