Defragmenter
Defragmenter Lite/Pro is a utility to automate the necessary steps for an
efficient and problem-free disk defrag.
Does your screen saver interfere when you defrag your hard disks?
Does "Drive's content changed: restarting..." sound familiar?
Does "Windows cannot defragment this drive because..." sound familiar?
Did you know that Windows pagefile is the main reason for poor results
after a disk defrag?

Defragmenter Lite/Pro is a one-click solution for all these problems and more. Just click OK, turn off your screen and go to bed. Defragmenter Lite/Pro will:
Remove the PageFile.
Disable running applications.
Run Windows/DOS Scandisk.
Run Windows/DOS Defrag Disk.
Set the PageFile.
Enable running applications.
Shutdown/Restart Windows.

The Pro version includes command line capability for automation purposes.

Excerpts from program FAQ:
What is the significance of removing Windows pagefile before defragmenting?
Pagefile is a large file used by Windows to store some temporary data.
Through shrinking and expanding Windows pagefile gets spread all around the hard disk in a discontinuous way. Thus it prevents your files to be
defragmented optimally.
What is the significance of disabling running applications before
defragmenting?
Running applications like your installed programs (firewall, anti-virus, etc) or Windows service programs (Print Spooler, Windows Audio, etc) interfere with the disk defrag. As a result the process has to restart and the disk defrag progress drops to 0%. The "Drive's contents changed: restarting
...
" message displayed during a disk defrag, refers to this problem.