I was fixing another windows box those days and I was forced to check the fragmentation, which was the biggest blocker on that system, disregarding the user and the fact that the system got more than one windows partition. So I came up with a little trick, using defrag.exe from shell:
%windir%\system32\defrag.exe -f c:
%windir%\system32\defrag.exe -f d:
%windir%\system32\defrag.exe -f e:
The example shown here defrags the drives C, D and E one after the other without user interaction.