Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove local Profile

Status
Not open for further replies.

cjkenworthy

Programmer
Sep 13, 2002
237
GB
We have hundreds of users, all of whom do not require a profile/their settings preserved - they do not have roaming profiles.

However, when they logon Windows automatically creates a local profile in the C:\Documents and Settings\... folder. This happens at each computer the user logs into, so with 96 computers, and 500 users, this leads to a lot of needless hard disk space.

In group policy I have specified that cached roaming profiles be removed at logoff - but realise that this is something differnent, as the users do not have a roaming profiles.

I could create a script to simply delete the username directory in C:\Documents and settings\ with the profile in at log off - would this work?

Or is there a simple way of deleting this local profile?
 
I've used that before, but:

a) it requires me to run it interactively (unless I can have it run at logoff - is this possible? I thought a profile could only be deleted after they are completely logged out?

b) it does not work reliably, and will not always remove all local profiles, plus it can't leave selected profiles which i need to keep.

c) it takes a long time to run!

- our machines are not left on overnight, so it would need to happen after each user session has finished, and they log off.
 
a). It has both a batch and GUI mode
b). I have ever experienced the first issue; the second assertion is just not true -- you can be selective in both batch and GUI mode
c). If time and other considerations become important, consider using roaming profiles with the GPO to not save local copies set.
 
I've created a logon script to remove local profiles. I have assigned it to the 'Startup' Scripts in the Group policay object, for Computers:

Set WshShell = WScript.CreateObject("WScript.Shell")
Set WSNetwork = CreateObject("WScript.Network")

Dim CommandString
commandString = "\\dc01\NETLOGON\delprof.exe /i /d:1"

WshShell.Run CommandString

Although it appears to run the script, it is not deleting the profiles in the C:\Documents and Settings\ directory.

Is this something to do with the script running in LocalSystem context? The delprof.exe file resides on the server.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top