Scheduling Disk Defragmentation is a little different, inasmuch as it doesn’t appear in the default list of software displayed by the the Scheduled Task Wizard.
In this case you need to click Browse and locate the program in the Windows/system32 folder.
Select the frequency …
… the time at which you want the software to be run …
… and your username/password, as before.
Select the defrag.exe file and click Open.
Note that for a user to be allowed to schedule a task, it is necessary for their associated user account to have a password. If this isn’t the case, the error condition 0x80070005 will result.
See the HOW TO CREATE AND CONFIGURE USER ACCOUNTS tutorial for instructions on how to specify or change a password for an existing user account.
Relevant Microsoft Knowledge Base Articles:
- 178706: How to Schedule a Program Using Task Scheduler
- 315246: How to Automate the Disk Cleanup Tool in Windows XP
- 555098: How to Automate Disk Defragmenter Using Task Scheduler Tool in Windows XP