Go here:
http://beemerworld.com/tips and select the table for your Operating System.
Look for "Maintain Your WinX PC"
It will tell you how to go about shutting down things that will disrupt the scandisk and defrag in Windows.
Performing System Maintenance routines in Safe Mode is the best way but not always prudent or advantageous.
Cheers!