I need a script or a batch file that can either be run automatically or manually by us, remotely. It should do the following to each of 17 computers in a lab. The computers are running XP Pro SP-2.
1) Restart all of the computers (I know how to do this, and figure I would need two scripts, one to run after the other... how do I set that up?)
2) Inside of a C:\Documents and Settings - Delete all folders except for:
- All Users
- Default User
- Any other system folders that need to stay in there.
We do not know what the names of the folder would be... otherwise this would be a very simple batch. Not only can the folders in there be any one of 800 or so users, it may also be variations of that user's login name (such as doejohn.000, doejohn.001, etc.).
I would also need some way of knowing that the folders were successfully deleted. A single log would be nice, back at my (the remote administrator) computer. One log file per machine would be not so nice (but workable), and I would need some way of collecting and analyzing all 17 files quickly.
Unfortunately, folder sharing is not a solution for us here. If this task simply cannot be done, please explain that and why, if you could.
We eventually plan on expanding this to all of the PC's that we manage (200+), and are using this lab simply as a pilot. Getting this to be as automated as possible is very important. Actually scheduling the task to run automatically will not be a problem, as I already know how to do this. It would be best to use the remote management capabilities of XP (see below) but I can also work with putting a script or batch file on each workstation, if need be.
This script would serve as a temporary fix for another issue we are having, detailed here: http://www.experts-exchange.com/Operating_Systems/WinXP/Q_21210077.html
. That issue is still unsolved, is directly related to the Autodesk licensing service, and is worth 500 points.
On a side note... if you can give any suggestions, links, tutorials, etc. on managing remote XP Pro machines, please do so. We currently use UltraVNC and Remote Desktop on occasion, but I know there is a way to connect to computer management, and I'm sure plenty of other things, using another remote XP Pro machine. I'm looking for a detailed list or something that goes through all the possibilites, command line or not. For instance - stopping and starting a service on 100 computers at once, and (hopefully) getting conformation of any failures.
Points will be split if you can answer a piece of the question.
Thanks in advance,