Hey,
Is it possible to create a batch or vbs script to defrag xp machines from a server? Does anybody know how to do this?
Thanks

How pretty a solution do you want to make it, you could use psexec in a batch file with the "defrag.exe c:" command which is in xp and will defrag in the background which is probably the simplest. You can also use WMI in vbs to remotely execute and moniter the same command if you have the domain firewall profile setup right on your clients.
Hiya,
This is my defrag group policy startup script, it adds a scheduled task...
This creates a weekly task which starts at 00:45!schtasks.exe /create /SC WEEKLY /D SAT /TN Defragmentation /TR "\"C:\windows\system32\defrag.exe\"c: -f" /ST 00:45:00 /SD 01/01/2009 /RU SYSTEM
Hope this helps!,
Mart
Hey Mart,
That looks great, thanks! Will give it a try monday morning. Do you or anybody else have something simular to perform a disk cleanup or run ccleaner?
Thanks.
You might want to look into using:
This will show a panel where you can tick what items you want cleaning up. These settings are stored in the registry.Code:cleanmgr.exe /sageset:50
Will run the cleanup commands you configured earlier.Code:cleanmgr.exe /sagerun:50
If you do the /sageset:50 part when building your base image then you could execute the cleanup on a shutdown, remotely, or via a scheduled task.
This page explains the process a bit more with references to the location in the registry where the settings are stored: Automate Disk Cleanup using Task Scheduler in Windows XP
Ross
There are currently 1 users browsing this thread. (0 members and 1 guests)