Computer viruses are a security threat and also cause several errors like “ERROR_VIRUS_INFECTED.” This error mainly followed by the “Operation did not complete successfully because the file contains a virus” notification.
In this article will show you how you can easily fix this issue with possible solutions and convenient methods: How to Fix Operation Did Not Complete SuccessfullyChange AntivirusRemoving your antivirus from your operating system is not the best fix, but it can help to fix this issue.
However, sometimes Defender causes the operation did not complete the error.To fix this issue, you need to disable Windows Defender properly on your system.Here are the steps to follow:Tap the Windows + I button on your keyboard to launch the settings application on your device.Under the Settings, select the “Update and security” option, in the left pane, move to the “Window Defender,” and then in the right pane click “Real-time Protection.”After the above process, Window Defender will turn off, and you can run your file without any issue.To completely turn off Windows Defender, you have to edit the registry.Here are the steps to follow:Tap the Windows + R button to open the run command prompt.In the Run command –line type “Regedit” and then tap the “Enter” button or tap “OK.”In the left pane you need to move on:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defenderkey.
Locate “DisableAntiSpyware DWORD” in the right pane.
Now type “DisableAntiSpyware” as the new name of DWORD and then double-tap on it.Set the value from 0 to 1 and then click “OK” to save your changes.After the above process Windows Defender will permanently turn off, and you can’t see this error on your device again.If you don’t wish to edit your registry, you can turn off Windows Defender via “Group Policy Editor.”Here are the steps to follow:Tap the Windows + R button on your keyboard and then type “gpedit,msc.” And then, hit the “Enter” button or tap “OK.”When the Group Policy editor appears on the screen, navigate to the left pane and select “Computer Configuration” click “Administration Template” hit Windows Computer” and then click “Windows Defender.In the right pane double-tap on Disable Windows Defender.”Click the “Enable” button and then select “Apply” and hit “OK” to save your changes.Now restart your PC and check for improvement.Add Problematic File into Exclusion ListIf you are facing this error when you are trying to access any files, it is possible that there is a problematic file.
Simply add it to the Exclusion list to fix the problem.Reinstall Antivirus“Operation did not complete successfully” error may occur due to improper installation of antivirus.