The message you received was not shared here, so I will offer that most can just boot to SAFE MODE, defragment there and then reboot when they want to do this.
The article at http://support.microsoft.com/support/kb/articles/q222/4/69.asp applies to defrag problems as well.
Bob
why do i get a message saying another program is writing to this drive?i disconnect when i run scandisk&defragment? windows 98 se.
edward

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic