Wednesday, June 30, 2010

Disable Disk Defragmenter on Windows Vista

Ok, this is not a .NET topic at all. Still. This problem got increasingly annoying on my Vista laptop. Upon each reboot, and at least once a day even without reboot, disk defragmenter kicked in and analyzed the disk (“Analyzing disk”). Each time it would say this would take “a few minutes”. However, I always had more than enough time to go fetch a coffee.

Of course I found all the recommendations regarding switching off the schedule and also go to the scheduled tasks and disable the one or two defrag related tasks. I also found the hint that changing certain registry values would help. And still, upon each reboot and even without reboot at least once a day disk defragmenter couldn’t help itself to at least analyze the disks even if it wouldn’t do the defragmentation itself. If would do so even if it came to the conclusion about 15 minutes ago that the hard drives would need to be defragmented.

So, here is what I did to disable disk defragmenter from running:

  • I opened explorer and navigated to \windows\system32
  • I took ownership of “dfrgntfs.exe”
  • Then I added myself with full permissions to the file
  • Finally I renamed the file to “dfrgntfs.exe_”

And now it has finally stopped re-analyzing the disks. I understand that it is useful to do that occasionally. But every 15 minutes? How much data can I possible write to the hard disk that this interval is justified?

And if I ever feel like defragmenting my hard disk(s) I just rename it back to its original name and run it manually.


Post a Comment

All comments, questions and other feedback is much appreciated. Thank you!