Quite long ago I read a post in forum that a user’s hard drive becomes fragmented whenever he finished a full scan. From a logical point of view, this is possible because antivirus scans archive files and to do that, the antivirus would have to extract the files to the computer. I did a full research on all major brands of antivirus by placing a huge 2GB ZIP file with thousands of files in it and then did a full scan but couldn’t replicate the problem as there were no major fragmentation.
However I noticed another weird behavior with Kaspersky which is no matter how many times I used Defraggler to defrag the system partition, it will always end up with fragmented files even right after finishing a full disk defragmentation. Other antivirus software have no such problems and normally the analysis results shows 0 fragmented files after finished defragging. I managed to find out what is the cause of this and also how to fully defrag a computer with Kaspersky installed.
The reason for this behavior is Kaspersky has a self-defense module where it prevents any software from accessing Kaspersky files or registry. When you defrag your hard drive with the Kaspersky self-defense module enabled, the defrag application cannot access the Kaspersky folder and skips it from being defragged. For people that wants to squeeze the last ounce of performance on their computer, they will want to defrag Kaspersky too and hopefully it will perform better and faster.
Fortunately it is easy to defrag Kaspersky. First you need to disable Kaspersky Self-Defense by right clicking on the Kaspersky icon at the system tray and select Settings. Click on Options at the left pane and at the right pane, uncheck “Enable Self-Defense“. Click OK to close the Settings window. You can keep Kaspersky process running and it is not necessary to terminate Kaspersky’s process by exiting it from the system tray.

Now you can run Defraggler or any disk defragmentation tool of your choice to fully defrag your hard drive including Kaspersky. Make sure you turn on the Self-Defense option after defrag for better computer protection. Do note that whenever Kaspersky databases is updated, there will be fragmentation again.

The self-defense module is meant to protect itself from being modified or controlled by unauthorized third party application such as virus but it can be annoying as well. One of such annoyance is the inability to remote control the computer when Kaspersky interface or popup is shown.
Related posts: