Thursday, November 13, 2008

Scheduling Disk Defragmenter

I've discussed the Windows disk defragmenter in class recently, and some students asked if there is a way to automate this so that it runs for you. I've done a little researching on it, and it turns out that it's not as simple as one might hope. They've made it easier in Vista, but in the XP version of the operating system, it's a little bit more of a task. I've taken steps from the Microsoft Web site and made them a little clearer, I hope.
  1. Click on the Start Menu
  2. Select Control Panel
  3. Double-click Scheduled Tasks (or, if you are using the "Category" view, click on "Performance and Maintenance", and then click Scheduled Tasks)
  4. Double-click Add Scheduled Task
  5. On the Scheduled Task Wizard dialog, click Next
  6. Click Browse
  7. Copy and paste the following line in to the dialog box:
    c:\windows\system32\defrag.exe
  8. Click Open
  9. Click Next
  10. Select how often you wish Disk Defragmenter to run (recommended: once a month)
  11. Click Next
  12. Pick a time to run (a time the machine is on but a time you are not using it)
  13. Click Next
  14. Click Next
  15. Enter a user name under which the Disk Defragmenter scheduled task will run. Note: This user must be an administrator on the local machine.
  16. Enter the password for the user you entered in the previous step
  17. Confirm the password for the user
  18. Click Next
  19. Check "Open advanced properties for this task when I click Finish"
  20. Click Finish
  21. In the Run text box, you should see the full path and command for defrag.exe. By default, this path is C:\WINDOWS\SYSTEM32\defrag.exe
  22. Copy and paste the following line in to the box, or simply add the C: at the end
    C:\WINDOWS\SYSTEM32\defrag.exe C: /noprompt
  23. Click OK
  24. In the Set Account Information dialog, re-enter and confirm the password for the user listed in Run as
  25. Click OK
Oddly enough, most other programs (backup, disk cleanup) can be scheduled there easily...seems like the disk defragmenter was just overlooked.

The original article can be found here:
http://support.microsoft.com/kb/555098

3 comments:

Anonymous said...

Having switched to Vista, I also switched to a third party defrag program- Diskeeper08 which can be set to run automatically. Its got other features I was looking for, defrags MFT, low free space defrag and most of all a GUI that enables me to check the progress of the task.

Professor Cameron said...

Diskeeper08 is a great program, but of course, not free. I'm expecting the students who this post was intended for to either a) not have the desire to pay extra for the tool or b) have the desire to download cracks and mess around with that stuff :)

But yes, Diskeeper is a great little tool.

Anonymous said...

hey no intersting computer stuff professor cameron?