Fix “Operation did not complete successfully because virus” Error in Windows 11/10

Solutions to Operation did not complete successfully because the file contains a virus or unwanted software in Windows 11 or 10.

Sometimes download or installation of a program might fail despite being authentic and be declared a virus. This issue is a Windows-related problem where the defense mechanism blocks the app download unfairly and the error message, “Operation did not complete successfully because the file contains a virus or unwanted software” appears as a result. The shocking error can prevent the downloading process of the file or program even when it is being taken from a trustworthy website.

Commonly, when Operation did not complete successfully because virus error occurs in Windows 11 and 10 the software you are downloading is not harmful. Windows Security settings are the main culprit in this case so downloading the program by disabling them is the potential solution. However, we recommend checking the legitimacy of the software before following the methods ahead. See a previous post: Error 0x80080204: The operation did not complete successfully on Store Windows 10.

Operation did not complete successfully because virus

Operation did not complete successfully because virus

Here is how to fix Operation did not complete successfully because virus Error in Windows 11/10:

Temporarily Disable Windows Defender

Suppose you are confident in the file’s authenticity. Contingent upon the legitimacy of the file, override the alert by temporarily deactivating Windows Defender and accessing it with the antivirus turned off.

Option-1: Deactivate Windows Defender via Settings

  1. Open “Start menu” by clicking the “Windows icon” from the taskbar.
  2. Select “Settings” or use the Windows + I shortcut.
  3. Navigate to “Privacy & security” > Windows Security > Virus & threat protection”.
  4. Click on the “Manage settings” link under the Virus & Threat Protection header.
  5. On the new page, toggle off “Real-time protection”. Retry downloading the file.
  6. If the issue persists, repeat the process and turn off “Cloud-delivered protection”. If needed, resort to disabling Windows Defender through the Registry.
how to fix Operation did not complete successfully because virus in Windows 11 or 10

Option-2: Disable App & browser control

  1. On the Windows Security app, click on App & browser control.
  2. Click “Reputation-based protection settings” link.
  3. Turn off the “Check apps and files”.
  4. Now try to download the file and see if the error is fixed.
App & browser control windows security check apps and files

Option-3: Deactivate Windows Defender via the Registry

  1. Open the search bar by clicking the “magnifying glass icon” on taskbar or press the “Windows + S” keyboard shortcut.
  2. Type “Registry Editor” and select the first matching result.
  3. Navigate to
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender
  1. Find the registry entry named “DisableAntiSpyware” and double-click on it.
  2. If the key is absent, right-click on a space, choose New > DWORD (32-bit) Value, name it “DisableAntiSpyware,” and double-click to open its properties.
  3. Set the Value data to 1 to disable Windows Defender.
  4. Exit the Registry Editor and restart your computer for potential performance improvements.

Read: How to disable Windows Defender Permanently in Windows 11

Disable Third-Party Antivirus Program

Antivirus programs can hinder normal computer operations by blocking apps and services. To determine if your current antivirus program is causing the error, temporarily disable it. Note: This method is not recommended due to potential risk so proceed only if you are aware of the risks and have a system backup.

  1. Navigate to the right side of taskbar and click on “up arrow” (Show hidden icons).
  2. Right click on Antivirus icon and select Disable from context menu.
  3. If any time frame is shown, choose as per your preference.
  4. Try downloading the software and you get success again enable the antivirus.

Add File or Folder to the Exclusions List

To bypass the warning without turning off the antivirus, add the file or folder to the exclusions list.

  1. Open File Explorer, navigate to the file’s location, and select “Copy as path”.
  2. Click on search, type “Windows Security,” and launch it.
  3. Switch to the “Virus & Threat Protection” and click on “Manage Settings”.
  4. On the same, page, under “Exclusions”, click “Add or Remove Exclusions”.
  5. Then, click “Add an Exclusion”.
  6. Select “File” or “Folder” from the drop-down menu, paste the file path, and click “Open”.
  7. After adding the exclusion, run an antivirus scan to ensure no real malware is present.

Repair File Explorer

If the error is due to a File Explorer problem, follow these steps:

  1. Click on “Serch”, type “Command Prompt,” right-click, and choose “Run as Administrator”.
  2. When prompted by UAC, click “Yes”.
  3. In Command Prompt, type and execute the following commands:
sfc /SCANFILE=c:\windows\explorer.exe
sfc /SCANFILE=C:\Windows\SysWow64\explorer.exe
fix Operation did not complete successfully because virus
  1. Reboot the system.

Fix Windows Backup

Resolve the error caused by temporary Internet files and cache in backups:

  1. Press “Windows + R”, type “control,” and press “Enter” to open Control Panel.
  2. Change view mode to Large icons, and click on “Internet Options”.
  3. On the “General” tab, click “Delete” under “Browsing history”.
  4. Uncheck “Preserve Favorites website data”, check relevant options, and click “Delete”.
delete browsing history preserve favorites website data
  1. Restart the PC.

Run Disk Cleanup Utility

Use the Disk Cleanup utility to delete temporary files and folders:

  1. Open the search bar, type “Disk Cleanup,” and select the first result.
  2. Select the Windows 10 system drive (usually C:) and click “OK”.
  3. Choose “Temporary Internet Files” and “Temporary Files”. Optionally, delete other junk files.
  4. Click OK and then Delete Files.

Run Antivirus Scan

Run a security scan using Windows Defender:

  1. Open the search bar with Windows + S, type “Windows Security,” and launch it.
  2. Switch to the “Virus & Threat Protection” tab and click on “Scan Options”.
  3. Select “Full Scan” and click “Scan Now”.
  4. Review scan results.

The takeaway:

Now you can apply the above fixes to get rid of the “operation did not complete virus”. However, exercising caution in online downloads is paramount to preventing future errors. Avoiding unofficial websites mitigates the risk of encountering malware or unwanted programs. This comprehensive guide aims to empower users to troubleshoot and overcome the “Operation Did Not Complete Successfully Because the File Contains a Virus” issue effectively.

Methods:
Temporarily Disable Windows Defender
Disable Third-Party Antivirus Program
Add File or Folder to the Exclusions List
Repair File Explorer
Fix Windows Backup
Run Disk Cleanup Utility
Run Antivirus Scan

That’s all!!

Sharing is caring    Share Whatsapp

 
Topics:  Windows
  
About Sunita
Love to play with Windows 11 and 10. Suggestion - Going for Registry change or system files edit then remember to take a backup or create a restore point before Starting.