In this step, we will use Windows’ built in Disk Defragmentation utility. There are many other, better defrag applications out there (personally, I use Diskeeper. It has it’s own scheduler), but this one is free and we wouldn’t have to waste time and space installing a third-party application.

Table Of Contents

This is the Third Step in the Fresh Computer Series.

Schedule The Task

  1. Navigate to: Control Panel -> Scheduled Tasks -> Add Scheduled Task
    (Alternately, you run this from the Run dialog: control schedtasks)
    Control Panel -> Scheduled Tasks -> Add Scheduled Task
  2. Hit Next in the dialog box that opens.
  3. In the Scheduled Task Wizard, put this in the address bar [1]:
    %SystemRoot%\system32\defrag.exe
  4. Click Next. You could set this to run Daily but that’s not really necessary. We’ll set the defrag time to Weekly. Set The Task To Run Weekly
  5. Click Next. Enter the time and date for the task. Set the Start time for 4:30 AM every 1 weeks, select the day of the week as Monday.
    Set The Time And Day For The Task To Run
  6. In the next screen, enter in the username and the password for your Windows user account [2].
    Set Your Username And Password
  7. Tick the “Open advanced properties for this task when I click Finish.” checkbox and click the Finish button.
    The Setup For The Scheduled Task Is Complete
  8. In the advanced settings, look for the Run text field. We need to add a space, then the drive letter of the drive we want to defragmant, to the end of the path:
    c:\windows\system32\defrag.exe C:
    Add The Drive Letter Of The Drive You Want To Degrag
  9. Click the Set password… button (right of the Run as textbox with your username) and add your Windows password [3]
    Enter Your Windows Password
  10. Click OK in all dialogs.

Next, we can proceed to Fresh Computer Series Step Four: Automate A Reboot.

[1] I had you use the %systemroot% variable just in case you’ve installed Windows in a location other then the default :wink: The actual location for the Disk Defragmenter should be:
C:\WINDOWS\system32\defrag.exe
[2] This user needs to be a System Administrator.
[3]Even though you put in your password in the sixth step, you have to type it again.