You have to run CMD as Administrator. Just go to the start menu and type cmd in the search panel and right click the icon and that will work. I had the the same thing happen to me.
AusLogics Disk Defrag works well too. The makers of CCleaner have Defraggler but it does not work well at all, it often takes 4-8 passes or more to fully defrag.