Google Groups Home
Help | Sign in
Message from discussion Delete everything except command - for profile deletion?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Torgeir Bakken (MVP)  
View profile
 More options 4 Feb 2005, 20:45
Newsgroups: microsoft.public.windowsxp.general
From: "Torgeir Bakken \(MVP\)" <Torgeir.Bakken-s...@hydro.com>
Date: Fri, 04 Feb 2005 21:45:25 +0100
Local: Fri 4 Feb 2005 20:45
Subject: Re: Delete everything except command - for profile deletion?

Jason Ryon wrote:
> Is there a way to run a command or script which will delete
> everything in a folder, except a few exception folders?

> The reason I ask is that I would like users profiles to be deleted
> from the local computer when they log out.  I was thinking I would
> just put this as a logout script to remove all folders in the
> C:\Documents and Settings except Administrator, Default User, and
> All Users folder.

Hi

You can use Delprof.exe, as long as it is ok that the Administrator
profile is deleted (no big deal really, it will be recreated
automatically when you log on with the Administrator account, getting
the settings from the Default User profile").

If you run the command "Delprof.exe /Q", it will delete all existing
profiles on a computer (but not the profile of the user that runs
Delprof).

It will not touch any other folders in the "C:\Documents and Settings"
folders, such as "All Users", "Default User, "LocalService" and
"NetworkService", it will only delete "real" user profiles.

Delprof.exe is in the free Windows Server 2003 Resource Kit:

http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57f...

(The kit will install on WinXP or later, the individual files can
then be copied to other computers if needed)

--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google