One of my client’s computer encountered a problem which is unable to run Windows Disk Defragmenter. Windows Disk Defragmenter is a computer program included in Microsoft Windows designed to increase access speed (and sometimes increase the amount of usable space) by rearranging files stored on a disk to occupy contiguous storage locations, or defragmenting. The purpose is to optimize the time it takes to read and write files to/from the disk by minimizing head travel time and maximizing the transfer rate.
The problem is whenever he tries to run the Disk Defragmenter shortcut from Start > Programs > Accessories > System Tools > Disk Defragmenter, only an error window appears:
MMC cannot open the file C:\Windows\system32\dfrg.msc. This may be because the file does not exist, is not an MMC console, or was created by a later version of MMC. This may also be because you do not have sufficient access rights to the file.
Here are some suggestions on how to fix running disk defragmenter problem in Windows. One of the methods below should be able to help you restore Windows Disk Defragmenter. Try the first solution and then run Disk Defragmenter. If it didn’t fix the problem, continue with the second one and etc.
Solution 1: Make sure you have rights to run Microsoft Management Console (MMC) and MSC file.
Solution 2: Go to Start > Run, type regsvr32 msxml3.dll and click OK.
Solution 3: Go to Start > Run, type regsvr32 dfrgsnap.dll and click OK. Then again go to Run, type regsvr32 dfrgui.dll and click OK.
Solution 4: Go to C:\Windows\Inf, right click at dfrg.inf file and select Install.
Solution 5: Go to Start > Run and type sfc /scannow. Make sure you have your Windows XP installation disc in the CD/DVD drive.
Solution 6: Download and apply .MSC association fix.
Solution 7: Download and apply Defrag SnapIn registry fix.
Solution 8: Download and install latest MMC 3.0 from Microsoft.
One of the methods above should be able to help you restore your disk defragmenter. But for my case, I’ve gone though all methods above and it still doesn’t restore Windows Disk Defragmenter. Every time I run defrag, I still get the error MMC Cannot Open the File C:\WINDOWS\system32\dfrg.msc. After days of trying, finally I just decided to rename the dfrg.msc file at C:\WINDOWS\system32\ to dfrg-renamed.msc. I ran dfrg-renamed.msc, and I was shocked to see that it was able to run! So I created a shortcut for dfrg-renamed.msc and place it at Start menu and desktop for my client.
Until today I still couldn’t figure out what is causing this weird behavior but this workaround allows me to run Disk Defragmenter without getting the MMC Cannot Open the File C:\WINDOWS\system32\dfrg.msc error. I’d appreciate if you can share with me what might be the cause of this problem and how to really fix it.