See if
mmc.exe is running in the Task Manager
If yes stop it and then try defrag again.
Other tips:
Defrag with XP SP2 needs the DCOM Server Process Launcher service running.
Click Start, Run and type SERVICES.MSC
Double-click the DCOM Server Process Launcher service
Set it's startup type to "Automatic"
Restart Windows.
---------------------------------------------------
Start | Run | Type: regsvr32 dfrgui.dll | Click OK
Start | Run | Type: regsvr32 dfrgsnap.dll | Click OK
----------------------------------------------------
Windows® XP File Association Fixes
Copyright 2003 - Doug Knox
http://www.dougknox.com/xp/file_assoc.htm
Read the instructions. Then get...
INF File Association Fix (Restore the default assocation for INF files)