If you activate files that contain viruses, they will infect your system. This is why most antivirus programs, including Windows Defender, do not allow you to open a file or run a program associated with it if they suspect that the file/program may cause a virus attack.
In this case, you will get an error message – Operation failed because the file contains a virus.
What is the cause of the “Operation failed” virus problem in Windows 10?
- You downloaded the original file, but Windows Defender detected a virus: If you downloaded something from a genuine website, Windows Defender may have detected a false positive. This is a common problem for all antivirus programs – if the code or behavior matches known malware, Windows Defender may consider the file dangerous.
- You have downloaded an infected file: As a rule, invalid links and malicious users distribute files that look genuine but contain malware. In this case, Windows Defender displays a warning after protecting your computer.
How to fix the “Operation incomplete” virus error in Windows 10?
Turn off Windows Defender
- Locate Windows Defender Shield among many other applications in the Start menu.
- Alternatively, press the Win+I key combination to open the settings.
- Click on Update and Security.
- Click on the Windows Security tab.
- Click on Virus and Threat Protection.
- Under Virus and Threat Protection settings, tap Manage settings.
- On the page that appears, click Real-time Protection to disable Windows Defender.
Disable installed third-party antivirus programs
- Click the Windows icon.
- Locate and open Task Manager
- In the main menu of the page, click the Autorun tab.
- Select the antivirus program from the list of running programs.
- Right-click it and select Disable.
- Reboot the system for the new settings to take effect.
Adding an exception list in antivirus
- Open Windows Defender
- Find the Virus and Threat Protection option.
- Select Exceptions.
- Select the Add Exception option and select the folder you want to exclude.
- After completing this step, exit the page and restart your system.
Restore File Explorer
- Click the Windows icon.
- Type Command Prompt in the search box.
- Right-click on the search results and select Run as administrator.
- Be sure to enter Yes in the User Account Control field.
- Enter the following commands in sequence:
- Exit both commands and reboot the computer to see the new changes and messages.
Frequently Asked Questions
How to fix the message "Operation failed because the file contains a virus or potentially unwanted software"?
If you are absolutely sure that the downloaded file is genuine and does not contain a virus, you can bypass the warning message "The operation could not be completed successfully because the file contains a virus". To do this, you must temporarily disable Windows Defender and open the file while it is disabled.
- Open the Windows Start menu.
- Type Windows Security.
- Press the "Enter" key on your keyboard.
- Click on "Virus and Threat Protection" in the left action bar.
- Scroll to Virus and Threat Protection Settings and click Manage Settings.
- Press the Shift key under Real-time Protection to temporarily disable Windows Defender.
If you downloaded something from a genuine site, Windows Defender may have detected a false positive. This is a common problem with all antivirus software - if the code or behavior matches known malware, Windows Defender may classify the file as dangerous. In addition, invalid links and malicious users distribute files that appear to be genuine but contain malware. In this case, Windows Defender issues a warning after protecting your computer.