1.

Solve : Deleting Profiles with exceptions in a Batch File.?

Answer»

Hello!

I'd like to save the introduction for a later date, so let's get right down to business at hand.

I've been going through different ways of trying to delete all profiles (Except for the current profile, administrator, default user, and my own). I've thought about MAKING it work like this

md copy directory, Xcopy all profiles I want to save, RD Documents and Settings, MD a new Documents and settings, then xcopy the folders back into the new Documents and settings

Simply stated, it doesn't work.

Im hoping someone else knows how to create a batch file that will:
1. Delete all the profiles within Documents and Settings, saving a few profiles.

I've been digging through various other commands, Deltree, Copy... for an example. I still can't crack it and I've been digging at this for a couple days now.

My Name's Cliff by the WAY Quote from: melanton on May 13, 2010, 02:51:10 PM


1. Delete all the profiles within Documents and Settings, saving a few profiles.


http://www.dabcc.com/article.aspx?id=9369

( All the following information from the above site. )

<<<<<<<

"Deleting Profiles Manually:

•Open the control panel applet "System Properties" and navigate to the tab "Advanced". I know of the following shortcuts for this often needed dialog box:
◦Press Win+Break
◦Press Win+R to open the run dialog box. TYPE in control sysdm.cpl,,3 and press enter. Note there must not be entered a SPACE in front of the commas.
•Click on the settings button in the user profiles section.
•In the dialog that appears, CHOOSE the appropriate user profile and click on delete. Note: you must be an administrator for the delete button to even show up. And: you cannot delete your own profile.
Deleting Profiles Automatically

To learn more and to read the entire article at its source, please refer to the following page, Deleting User Profiles - Correctly at Helge Klein"
>>>>>


Discussion

No Comment Found