The cause of defrag failing with ME is System Restore which is always running unless you disable it totally. It can also be cause by your anti-virus program or by Trojans on the system.
But, as the System Restore function will always cause this problem unless disabled or you defrag in safe mode it is FAR better to use ScanDefrag 5·0 which will run cleanmanager, scandisk and defrag automatically for you with the choice of shutting down the computer when the maintenance run is finished or re-starting.
So all you have to do is to run ScanDefrag and switch the monitor off, go make a coffee and by the time you have finished drinking it, the computer should be fully defragmented.
ScanDefrag does all this in Windows pre-loading mode so that other programs cannot interfere with the progress of scandisk and defrag, in the same way that scandisk runs after a bad shutdown ... before allowing Windows to load.