Fixing Operation did not complete successfully because the file contains a virus” Error in Windows 10
It is common knowledge that when you open a file that contains viruses, it will automatically infect the operating system. This is why most antivirus programs like Windows Defender won’t allow the opening of a file or execution of any associated program if they detected that the file or program could potentially harm the computer. In situations like this, you may get an error stating, “Operation did not complete successfully because the file contains a virus”.
In addition, it is also possible that this error message can pop up even for known programs. To open the program or file that triggered the error, you will be given a couple of options in this post but make sure that the program or file is really safe to open and does not contain any virus. You can open the file or execute the program by disabling the Windows Defender or any antivirus program temporarily. You could also try to add an exclusion in your antivirus program or repair File Explorer or run the Disk Cleanup tool. For more details, refer to each one of the options provided below.
Option 1 – Try to temporarily disable the Windows Defender program
Although you could encounter this error with any antivirus program, it is more common in Windows Defender. Thus, you can try to disable it for a while when you open the file or execute the program. To do so, follow these steps:
- First, click on the Start button and go to Settings > Update and Security > Windows Security.
- Here, select the “Open Windows Security” option located in the right pane.
- After that, click on the “Virus and threat protection” option.
- Next, click on Manage settings under the Virus and threat protection settings.
- Then turn off the switch for both the Real-time protection and Cloud-delivered protection.
- Now restart your computer and try to open the file or execute the program again and see if it works.
Note: Do not forget to enable the Real-time protection and Cloud-delivered protection back in Windows Defender.
Option 2 – Try adding an exclusion in the Windows Defender program
- Open the Windows Defender Security Center from the system tray area.
- Next, click the “Virus & threat protection” option and then open the “Virus and threat protection settings”.
- After that, scroll down until you find the “Exclusions” and click on the “Add or remove exclusions” option.
- Then click the plus button and select the type of exclusion you want to add and from the drop-down list, select Folder.
- Next, navigate to the path where the file or program is located.
- When a User Account Control or UAC prompt, just click on Yes to proceed.
- Now try to run the program or file again and see if it worked. If it did, then make sure to turn on your antivirus. However, if it didn’t work, proceed to the next given options below.
Option 3 – Try to run a System File Checker scan
System File Checker or SFC is a built-in command utility that helps in restoring corrupted files as well as missing files. It replaces bad and corrupted system files to good system files that might be the cause why you’re getting the errors 0x8024a11a and 0x8024a112. To run the SFC command, follow the steps given below.
- Type “cmd” in the Start search and then right click on the appropriate search result.
- Next, select “Run as administrator” to open Command Prompt with admin privileges.
- After opening Command Prompt, type in sfc /scannow
The command will start a system scan which will take a few while before it finishes. Once it’s done, you could get the following results:
- Windows Resource Protection did not find any integrity violations.
- Windows Resource Protection found corrupt files and successfully repaired them.
- Windows Resource Protection found corrupt files but was unable to fix some of them.
Now restart your computer and see if the problem is fixed or not.
Option 4 – Run the Disk Cleanup tool
You can also try using the Disk Cleanup tool. To use it, refer to these steps:
- Tap the Win + R keys to open the Run dialog box and then type “cleanmgr” in the field and hit Enter to open the Disk Cleanup window.
- After that, select the drive you want to clean.
- Now click OK to clean the disk and restart your computer.
You might also want to try another option if the instructions given above didn’t help in fixing the “Operation did not complete successfully because the file contains a virus” error in your Windows 10 computer. This option is Restoro, also known as a “one-click” solution. What makes it better than other system utility tools or antivirus programs is that aside from helping you free up disk usage and memory in your computer, it helps you in fixing whatever issue your system is facing including BSOD errors. Aside from that, it also cleans out your computer for any junk or corrupted files that help you eliminate any unwanted files from your system. This is basically a solution that’s within your grasp with just a click. It’s easy to use as it is user-friendly. For complete set of instructions in downloading and using it, refer to the steps below.
Perform a full system scan using Restoro. To do so, follow these steps:
- Turn on your computer. If it’s already on, you have to reboot
- After that, the BIOS screen will be displayed, but if Windows pops up instead, reboot your computer and try again. Once you’re on the BIOS screen, repeat pressing F8, by doing so the Advanced Option shows up.
- To navigate the Advanced Option use the arrow keys and select Safe Mode with Networking then hit
- Windows will now load the Safe Mode with Networking.
- Press and hold both R key and Windows key.
- If done correctly, the Windows Run Box will show up.
- Type in the URL address in the Run dialog box and then tap Enter or click OK.
- After that, it will download the program. Wait for the download to finish and then open the launcher to install the program.
- Once the installation process is completed, run Restoro to perform a full system scan.
- After the scan is completed click the “Fix, Clean & Optimize Now” button.