I've recently been trialling various defragmentation tools, specifically:
The problem is that I have noticed the same issue with all three of them; that the de-fragmentation process completes in most cases or sometimes seems to get stuck and leaves the program running. For all programs there is a hanging process left behind, whether it completes successfully or not.
It's also difficult to shut down the hanging process as I receive "Access Denied" errors when trying to kill the task using a variety of methods (taskkill from the command prompt, the sys internals process manager or using the Windows Power Shell). Sometimes I'm forced to reboot to kill the process.
From reading around the subject it appears that these tools all make use of Windows functionality to de-fragment the hard drive, is there perhaps a fault in either my Windows 7 or possibly my physical drive which is causing all three of these alternative tools to fail in the same way?
It is possible to run some of the tools by rebooting the machine and having them run without the full Windows operating system to prevent any problems with files being locked or otherwise interfered with, but this isn't ideal unless it's the only solution to this problem.
Further information / clarification a full disk check has been carried out on the drive which has reported no errors. The de-fragmentation processes are seen to be running several hours after the de-fragmentation process has 'completed'.
Typically I would leave the process running at around 4pm when I leave the office and find a process still running when I get into the office at 8am the next day, with the process having finished several hours before.
What next? I'm wondering whether this should be a community wiki rather than a question as an answer has been given as to what you should do to check for problems if this happens to you (scan the disk, etc.) and an explanation as to how the process works but I strongly suspect that this problem is unique to this one PC?