Advertisement
Guides

How to fix ‘Operation did not complete successfully because the file contains a Virus’ Error (2023)

When you try to open an installed app from an untrusted author, your Windows desktop gives an “Operation did not complete successfully because the file contains a Virus or Potentially unwanted software” error message. This might indicate the application might contain a malicious file that can affect your Windows desktop. However, if you know that the application is genuine, and it’s a false flag by the Windows firewall, this guide will help you to fix the error.

Fix: “Operation did not complete successfully because the file contains a Virus” Error (2023)

Advertisement

Before fixing the “Operation did not complete successfully because the file contains a Virus” error on your Windows desktop, ensure the file or application is virus free and run a full scan. Also, have a backup of your files before doing anything on your Windows PC. After you are sure that your system is not under any malicious threat, you can follow these methods to fix the issue:

1. Disable Windows Defender to fix the ‘Operation did not complete successfully’ error

  • Press the ‘Windows’ + ‘I’ keys on your keyboard to open the ‘Settings’ window.
  • Now click on the ‘Update and Security’ tab, then select the ‘Windows Security’ tab from the left panel.
  • Click the ‘Virus and Threat Protection’ tab and turn off all the toggles in the ‘Virus & Threat Protection’ app.
  • If the confirmation prompt appears, click the ‘Yes’ option.
  • Now restart your Windows desktop to disable the Virus warning error message.

2. Add the restricted file to Exclusion List

  • First copy the file path of the suspected application from File Explorer to Notepad.
  • Navigate to the ‘Virus & Threat Protection Settings’ window by following the above steps.
  • Under the ‘Exclusion’ section, click the ‘Add or remove exclusions’ hyperlink.
  • Click the ‘+ Add an exclusion’ button on the new window.
  • Select the file, program, or folder option, whichever is applicable, from the pop-up menu.
  • A new prompt window will open, here paste the file path on the text box that you copied to your Notepad.
  • Now click the ‘Open’ or ‘Add’ button.
  • Now check if the “Operation did not complete successfully because the file contains a Virus” error is fixed.

3. Repair File Explorer to fix the ‘Operation did not complete successfully’ error

  • Open the Command Prompt with administrative rights from the Start menu Search box and type the following commands:

sfc /SCANFILE=c:\windows\explorer.exe

sfc /SCANFILE=C:\Windows\SysWow64\explorer.exe

  • Make sure to press the ‘Enter’ key on your keyboard after typing each command.
  • If there are any issues with the File Explorer, System File Checker will fix it, and you will get a message like ‘Windows Resource Protection found corrupt files and successfully repaired them’, now restart your PC to fix the false Virus error message.

That’s everything covered on how to fix the “Operation did not complete successfully because the file contains a Virus” error. Also, check out our other guides, such as How to fix System error 6118 in CMD or How to fix Microsoft Office Error Code 30204-44.

Advertisement
Devendran

A Storyteller who is keen to learn something new about technology.

Recent Posts

Best Cheapest CS2 Skins

In this guide, we'll explore the cost of skins in CS2, what determines their prices,…

1 day ago

The Evolution of UK Bookmaking from Local to Digital

The history of the UK is interconnected with the tale of bookmaking, reflecting the rich…

3 weeks ago

When is Helldivers 2 Coming to Xbox?

What are Arrowhead Game Studios plan to release Helldivers 2 on Xbox? Here are some…

2 months ago

How To Find Median in Excel?

Here is the formula on how to find Median of a dataset in Microsoft Excel.

2 months ago

FF7 Rebirth Trophy Guide: All Trophies List And Platinum (100%)

Here's the list of all the FF7 Rebirth trophies including the Platinum trophy.

2 months ago

FF7 Rebirth Demo Rewards: How To Redeem

Here's how to redeem all the demo rewards and bonuses in Final Fantasy 7 Rebirth.

2 months ago