Viruses can cause severe damage to your files and folders. It is always a security threat and must be guarded against using good anti-virus programs. At times, they cause an error like ERROR_VIRUS_INFECTED, which is followed by a message “Operation did not complete successfully because the file contains a virus”.
Let us look at solutions to this issue.
- Turn off Windows Defender
Windows has its own antivirus software in the form of Windows Defender. Before we go ahead with this method, ensure that the file you are trying to run isn’t infected.
- Press Windows key + I to open Settings.
- Under Settings, go to Update & Security. In the left pane, click Windows Defender and in the right pane, disable Real-time protection.
These two steps can be a temporary fix. To completely disable Windows Defender, edit your registry.
- Press Windows key+R to open the Run window.
- Type regedit. Click OK.
- Note that it is always better to create a backup of your registry if anything goes wrong. To backup your registry, go to File – > Export. Select All as Export range and enter the desired name. Select your output folder and click on Save to export your registry. In case of any error, you can run this file and restore the registry to its earlier state.
- In the left pane, go to HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftWindows Defender Now search for DisableantiSpyware DWORD in the right pane. If it isn’t there, right click empty space in the right pane and choose New > DWORD (32-bit Value). Enter DisableAntispyware as new DWORD and double-click it.
- Set Value data to 1 and click OK to save changes.
Now Windows Defender will be permanently disabled and this error doesn’t reappear.
- Add your problematic file to the Exclusions list
If you are getting this error while trying to access a certain file, it could be that the file is falsely thought of as a threat. If you are certain that the file doesn’t contain any virus or malware, add it to the exclusions list and check if it solves the problem.
- Scan your entire system
If the above error is a result of an actual malware, perform a detailed scan.
- Open Start Menu. Click Power Press and hold the Shift key on your keyboard and click Restart option on the menu.
- In the list that appears, click Troubleshoot -> Advanced Options -> Startup Settings. Click Restart.
- After your system restarts, you can see a list of options. Select any version of Safe Mode after clicking the corresponding key.
- In Safe Mode, do all the necessary scans and remove the malware.
- Repair file using Command Prompt
- Press Windows key + X. Select Command Prompt (Admin) from the menu.
- After Command Prompt opens, enter these lines:
Now the problematic file should be fixed and you can access it again.
Data recovery using Remo Recover software
If you encountered any data loss due to the virus infection on your system or any of your external storage devices, Remo Recover software can restore all your data with ease.
The data recovery software uses powerful scanning algorithms to locate, identify and retrieve files in a few simple steps.
If you are wondering how to remove shortcut virus from hard disk, Remo Recover simplifies the solution for you.
The file recovery tool can restore lost or deleted files from your hard drives, USB drives, memory cards, FireWire drives etc. If your drive is inaccessible due to a virus, it is advised to first recover the data safely to another storage device and then format the drive containing the virus.
Using this software, you can recover files from lost, deleted, formatted and re-formatted partitions as well.
The user interface is pretty simple. All you have to do is download the software, follow on-screen instructions for easy data recovery.