You can delete locked files with the RemoveOnReboot utility. You can install the RemoveOnReboot utility from here.
After you delete a locked file, you need to delete all the references to the file in Windows registry.
To delete a locked file:
- Right-click on the file and select Send To -> Remove on Next Reboot on the menu.
- Restart your computer.
Note:In the case of complex viruses that can replicate themselves, malware files can reappear in the same locations even after you have deleted those files and restarted your computer.