Operation Did Not Complete Successfully Because the File Contains a Virus Error in Windows 10 Fix

Your Windows PC is a much-improved version now, with all the latest updates and a whole lot of features to explore. However, it can also get complex at times, especially when you are trying to open programs. There are different types of errors that can disrupt your regular work or that interesting gaming session midway, and among them is the “Operation Did Not Complete Successfully Because the File Contains a Virus” Error.


A sudden error can be frustrating and this one is no different. there’s nothing to worry about, as we have two different and effective methods to deal with this error. Let’s see how to get rid of it.


Method 1: How to Fix “Operation Did Not Complete Successfully Because the File Contains a Virus” Error Via Settings App


Step 1: Click on the Windows icon on your desktop and click on the Settings option in the context menu, located above the Power option.


Desktop Windows Icon Settings


Step 2: In the Settings window, find and click on Update & Security.



Settings Update & Security


Step 3: In the next window, click on the Windows Security option on the left side of the pane, and then click on Virus & threat protection on the right-hand side of the pane.




Settings Windows Security Virus & Threat Protection



Step 4: In the next window, scroll down to the Virus & threat protection settings section and click on Manage Settings below it.


Virus & Threat Protection Virus & Threat Protection Settings Manage Settings


Step 5: In the Virus & threat protection settings window, scroll down and turn off the slider under Real-time protection and also under Cloud-delivered protection.


Virus & Threat Protection Settings Turn Off Real Time Protection Cloud Delivered Protection


Step 6: Again, scroll down further and turn-off the slider under the Automatic sample submission section.


Virus & Threat Protection Settings Turn Off Automatic Sample Submission


Now, exit from Settings, refresh the desktop and check if your desired program is opening hassle-free. If the problem persists, move onto the next method.


Method 2: How to Fix “Operation Did Not Complete Successfully Because the File Contains a Virus” Error Via Command Prompt


Step 1: Press the Windows key + X together on your keyboard and from the context menu, select Command Prompt (Admin) to launch Command Prompt with Admin rights.


Win + X Command Prompt Admin



Step 2: In the Command Prompt window, type the below command and hit Enter:


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

Once the first command has completed the scan, execute the below command:


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


Command Prompt Admin Execute 1st Command Complete Execute 2nd Command


Once completed, restart your PC and the error should not pop-up next time when you try to open the desired program.