Operation did not Complete Successfully because the File Contains a Virus

The system can be infected if you activate files which contain viruses. Anti-virus programs including Windows Defender wouldn’t allow opening a file or executing any associated program if they suspect the file/program could trigger a virus attack. In such a case, you would encounter the Operation did not complete successfully because the file contains a virus error. I will show you how to fix it with multiple useful solutions in the post.

Operation Did Not Complete Successfully

ERROR_VIRUS_INFECTED error and Operation did not complete successfully because the file contains a virus message can cause a lot of problems on your PC.

There are many antivirus tools available to you online, but none can completely stop the virus. There will always be malicious tools that go unnoticed and even the most expensive & popular antivirus tools can't detect these malicious tools.

Even if your files are 100% legal, your antivirus tools may keep coming up with false positives.

If you want to distinguish whether a file is genuine or not, the process can be delicate. You need to pay close attention if you try to deal with these files.

Before you confirm the file is a false positive, you need to scan the file with several different antivirus scanners. The error code that sometimes occurs underneath the message shown up in the title is actually triggered by Windows.

In some cases these errors can be caused by a false alarm, but you should be able to fix this problem by using one of the solutions in the post.

Fix 1: Adding an Exception for the Folder

If you are using several other antivirus tools besides Windows Defender, you need to know turning off one security tool causes the other to start acting. Fortunately, in order to fix this issue, you can simply try adding an exception for the file you want to run.

If the file is on a removable storage device, make sure the device is connected to the PC before opening your antivirus screen.



In different cases, be sure to select the correct folder location. Meanwhile, you can’t click on the file directly because you actually need to select the folder rather than the file which you want to add to the exceptions.

Fix 2: Disabling Windows Defender Temporarily

If the settings of Windows Defender are set to full protection, Windows Defender can produce some false positives, so it's normal for you to encounter a simple mistake like this.

When the problem involves Windows and Windows Defender, there is no effective way to actually run the reported file, and the only way is to disable Windows Defender completely (By following the steps).

Type windows defender in the search bar and click Windows Defender Security Center to open it.
Click Virus & threat protection to open it and click Virus & threat protection settings.
Under the Real-time protection section and the Cloud-delivered protection part, switch the toggle to Off.
Click App & browser control from the left panel, check Off under the Check apps and files part. You can also turn off SmartScreen if you think it will disturb your actions during which you wish to proceed.
Fix 3: Use Control Panel to Fix the Problem with Windows Backup

This error can also occur when you are running Windows Backup. The “Operation did not complete successfully” error message will show up when Windows Backup encounters the problematic file.



If you have tried the methods above and scanned your computer multiple times, and you're pretty sure your computer isn't infected, the false positive could be caused by temporary Internet and cached files.

Before you try to run Windows Backup again, you need to delete these files on all browsers you have used. Right now, you can follow the steps below to clear browsing data for both Internet Explorer and Edge (By following the steps below).

Type control panel in the search bar and click Control Panel to open it.
Choose View by: Large icons and then click Internet Options. The Internet Properties window will pop up.
Under the General section and then find the Browsing history part. Click the Delete… button and check the browsing history you want to delete.
Click Delete and then exit Control Panel.
Restart your computer and check if the “Operation did not complete successfully” error message still appears.
Click your Edge browser icon at the taskbar or search for it in the Start menu to open it
Click the three horizontal dots at the top right part of the browser and then click Settings.
Under the Clear browsing data section, click the Choose what to clear button.
Keep the first four options checked and then click the Clear button to clear data.
After you finished all these steps, the “Operation did not complete successfully because the file contains a virus” error message will not pop up again.

Alternatively, you can also use command prompt to fix the problem with Windows Explorer. Check out the post.

Protect Your Computer by Making a Backup

If your computer is really attacked by a virus, you will lose your data and your computer may crash. What can you do ahead of time to avoid these things?

The best choice for you is to make a backup of your data to keep your data safe. Although there are many backup programs available online, MiniTool ShadowMaker is the most recommended. It is a piece of free backup software.

By using its Backup function, you can back up files, folders, partitions, operating systems, disks to protect your computer and then you can restore your computer with the Restore function if your computer is in trouble.

Its Sync feature is as useful as the Backup function. With it, you can sync files and folders ahead of time to protect your data.

News From
MiniTool Solution

  • Issue by:Bair
  • Web:http://
  • About Viv-Media|Free Add URL|Submit Press Release|Submit How To|SiteMap|Advertise with Us|Help|Contact Viv-Media |China Viv-Media
  • Copyright© 2010-2020 viv-media.com Corporation.
    Use of this web constitutes acceptance of Terms of Service and Privacy Policy. All rights reserved.  Poetry Online :Ancient Chinese Poetry