Scripts Thread, Defrag script for more than 1 pc on a network in Coding and Web Development; Hey,
Is it possible to create a batch or vbs script to defrag xp machines from a server? Does anybody ...
12th June 2009, 02:29 PM #1
- Rep Power
Defrag script for more than 1 pc on a network
Is it possible to create a batch or vbs script to defrag xp machines from a server? Does anybody know how to do this?
12th June 2009, 02:39 PM #2
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.
12th June 2009, 02:46 PM #3
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!,
12th June 2009, 05:10 PM #4
- Rep Power
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?
12th June 2009, 05:36 PM #5
Originally Posted by lafleur1977
No sadly not, although i might look into the disk cleanup as that might be useful!
12th June 2009, 05:52 PM #6
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.
Will run the cleanup commands you configured earlier.
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
By CommodoreS in forum Network and Classroom Management
Last Post: 19th March 2009, 06:19 PM
By shane_saintsfc in forum Windows Server 2000/2003
Last Post: 17th March 2009, 08:49 AM
By notalot in forum Windows
Last Post: 12th January 2009, 08:24 AM
By techyphil in forum Windows
Last Post: 27th May 2007, 12:29 AM
Last Post: 16th November 2005, 09:36 AM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)