Solved

Deleting Profiles

Posted on 2004-09-24
5
370 Views
Last Modified: 2010-04-14
Is there a way to delete a users profile after they log off the system?
0
Comment
Question by:JoshDale
  • 2
  • 2
5 Comments
 
LVL 2

Expert Comment

by:vivekpara
ID: 12148320
You could write a WSH script or batch file to delete their profile on logoff...this is dangerous as the system synchronizes profiles if you are using roaming profiles.

An example of a Batch File that would work is:

c:
cd c:\Documents and Settings\
deltree %username%

You can either use Group Policy and put it in to the Computer's Logoff script or you could create a local policy for the computer using the MMC Local Policy editor and insert it in ITS Logoff script.
0
 
LVL 2

Expert Comment

by:vivekpara
ID: 12148327
deltree %username%

should be changed to

rmdir %username% /s
0
 

Author Comment

by:JoshDale
ID: 12148591
Well, does the batch file run before or after the files are sync'd with the fileserver?
0
 
LVL 84

Accepted Solution

by:
oBdA earned 500 total points
ID: 12150235
Assuming that you're using roaming profiles, there's a group (or local) policy you can use for that; you'll find it under Computer Configuration\Administrative Templates\System\Login, "Delete locally stored copies of roaming profiles" (or similar, not using an English version).

vivekpara's suggestion won't really work. During the user's logoff, his profile is still active. Parts of the folder will be deleted, other parts won't, because the files are still open. In addition, the user's profile does *NOT* reside at C:\Documents and settings\%username%; there are several possibilities as to how a profile folder's name can differ from the user's name. The correct path to the user profile is stored in %Userprofile%.
Using this script during the machine's shut down won't get you anywhere either. %Username% isn't even defined, and %Userprofile% points to the default user profile.

If you're not using roaming profiles, and simply want to not keep the profiles of the users, you can use a mandatory profile.
HOW TO: Assign a Mandatory User Profile in Windows 2000
http://support.microsoft.com/?kbid=323368
0
 

Author Comment

by:JoshDale
ID: 12152311
Good call, I missed that option when I was setting up their OU Group Policy. I checked it on so it should work now, thanks.
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Syteline and a new domain controller 4 727
Migrating from IIS5 to IIS8.5 3 178
Video card with drivers for Windows 2000 8 149
how to run this deletion request 4 30
NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
There's a lot of hype surrounding blockchain technology. Here's how it works and some of the novel ways it' s now being used - including for data protection.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

792 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