Option #1:
defrag_all.vbs - Defrag All Hard Drives - Can be run as a scheduled task
Does not create an error log
© Doug Knox - rev 03/29/2002
This code may be freely distributed/modified.

Your antivirus software may report this script as potentially malicious, or a possible virus. This is because the script writes to the System Registry.

Usage: Download defrag_all.vbs and save this file to your hard drive. Navigate to where you saved it and double click the file. This script will execute the Defrag command for every hard drive it finds on your system.  You can also run this script as a Scheduled Task.

defrag_all2.vbs - Defrag All Hard Drives - Can be run as a scheduled task
Creates an error log and displays the error log when complete.
© Doug Knox - 4/13/2002
This code may be freely distributed/modified.

Usage: Download defrag_all2.vbs and save this file to your hard drive. Navigate to where you saved it and double click the file. This script will execute the Defrag command for every hard drive it finds on your system. It will also create an error log in the root directory of the first fixed disk it finds (usually C:), and displays the log when finished. You can also run this script as a Scheduled Task.

This page last updated 06/03/2011 06:12
All material © Doug Knox