Fixes

Operation did not complete successfully because the file contains a virus [Fixed Completely]

Windows Virus and Threat protection or any other third-party antivirus software is essential to keep your system safe from Viruses that might attack your computer. Although these Softwares are very effective, sometimes they report false positives even if the file does not contain a virus. Quiet recently, users have reported an error that prevents them from opening a file or folder. It displays a message on the screen that states “Operation did not complete successfully because the file contains a virus”. If you have just encountered this error on your PC, don’t worry because we have compiled a guide that will help you fix it completely.

Operation did not complete successfully because the file contains a virus
The operation did not complete successfully because the file contains a virus Error Message

What prevents the operation from getting successful because of a virus?

After analyzing user reports, we concluded that there are several potential culprits that might end up triggering this error when you try to open a file or folder.

  • Windows Virus and Threat protection: Windows Virus and threat protection or Windows Defender is responsible for filtering out data and information coming to your system. Mostly, the “Operation did not complete successfully because the file contains a virus” error arises if the Windows Defender is triggering a false alarm. Refer to the steps indexed in Solution 1.
  • Antivirus blocking the file: Antivirus Softwares are essential to keep your system safe from viruses and threats. You might encounter this error message if your antivirus software has detected a virus in the file you are trying to open. However, this error can be fixed by whitelisting the file in your antivirus software. Follow the steps listed in Solution 2.
  • Corrupted explorer.exe files: File explorer is a GUI for accessing the system files. Sometimes, explorer.exe can get corrupted and prevent you from launching the file explorer properly. These files can be fixed easily by running some commands in the command prompt. Please refer to Solution 3 to carry this task out.
  • Internet Explorer’s Browser history: Internet Explorer keeps a track of every activity and updates its history every time you search something on the Internet. You might encounter the “Operation did not complete successfully because the file contains a virus” error on your computer if the Internet Explorer’s history is not cleared regularly. Therefore, to fix this error on your computer, follow the steps explained in Solution 4.
  • Corrupted files on your disk: All of your disk partitions contain essential files and data that are needed by the applications and software installed on your computer to function properly. Sometimes, these files can get corrupted and trigger the “File Contains a virus” error on your computer.  You can easily scan for these files and fix them by following the steps indexed in Solution 5.
  • Faulty Software: Sometimes the installation files of certain software or application can get corrupted in the directory and it triggers this error when you try to launch that application. If this is the case, then it is a very hectic task to troubleshoot the issue and locate the exact root of the “Operation did not complete successfully because the file contains a virus” error. The most efficient approach to rectify this issue is to uninstall the application completely and then reinstall it.

Before we start:

Before you proceed towards troubleshooting the error, it is highly recommended to update your operating system. Follow the steps indexed below to carry this task out.

  1. Press “Win+I” on your keyboard to open “Settings” and navigate to “Update and Security”.
    Update and Security
    Update and Security
  2. From the left pane select “Windows Security” and click on “Virus and threat protection” from the right side of the window.
    Virus and threat protection
    Virus and threat protection
  3. Now click on “Check for updates” under the “Virus and threat protection updates” section.
    Virus and threat protection updates
    Virus and threat protection updates
  4. Click on the “Check for updates” button and wait while the computer installs an updated version of this program.
    Check for updates to fix Operation did not complete successfully because the file contains a virus error
    Check for updates
  5. After this process is completed, restart your computer and check if the issue persists.

Fixing the “Operation did not complete successfully because the file contains a virus” Error on Windows 10:

Solution 1: Disable Windows virus and threat protection

  1. Press “Win+I” on your keyboard to open “Settings” and navigate to “Update and Security”.
    Update and Security
    Update and Security
  2. From the left pane select “Windows Security” and click on “Virus and threat protection” from the right side of the window.
    Virus and threat protection
    Virus and threat protection
  3. Now click on “Manage Settings” under the “Virus and threat protection settings” section.
    Manage Settings
    Manage Settings
  4. Disable the toggle button that is associated with “Real-Time Protection”, “Cloud delivery protection”, and “Automatic sample submission”.
    Disable Windows virus and threat protection to fix Operation did not complete successfully because the file contains a virus error
    Disable Windows virus and threat protection
  5. Now press the “Win + R” keys on the keyboard to open the Run box and search for “gpedit.msc”.
    gpedit.msc
    gpedit.msc
  6. Navigate to the following location from the left pane:
    Computer Configuration > Administrative Templates > Windows Components > Windows Defender
  7. Locate and select “Turn off windows defender” from the right pane.
  8. Now click on the “Enable” option and apply the changes.
    Clicking on the "Enabled" option
    Clicking on the “Enabled” option
  9. Now restart your computer and check if the “Operation did not complete successfully because the file contains a virus” error persists.

Solution 2: Whitelist problematic folder in your anti-virus programs

For Windows Virus and threat protection:

  1. Press “Win+I” on your keyboard to open “Settings” and navigate to “Update and Security”.
    Update and Security
    Update and Security
  2. From the left pane select “Windows Security” and click on “Virus and threat protection” from the right side of the window.
    Virus and threat protection
    Virus and threat protection
  3. Now click on “Manage Settings” under the “Virus and threat protection settings” section.
    Manage Settings
    Manage Settings
  4. Scroll down and click on “Add or remove exclusion” under the “Exclusion” section.
    Add or remove exclusion
    Add or remove exclusion
  5. Now click on “Add an Exclusion” and add your file or folder you are having trouble with.
    Add an Exclusion to fix Operation did not complete successfully because the file contains a virus error
    Add an Exclusion
  6. Now check and see if the error is terminated.

Avast:

  1. From the home screen of your anti-virus software, navigate to the “Settings”.
    Settings
    Settings
  2. Now navigate to the “General” tab and click on the “Exclusion” section.
    Exclusion
    Exclusion
  3. Now add the path to the problematic file to add it as an exception to the anti-virus.
    Add the path to the problematic file to fix Operation did not complete successfully because the file contains a virus error
    Add the path to the problematic file

Solution 3: Fix Windows Explorer using the command prompt

  1. Press the “Win + R” keys on the keyboard to open the Run box. Type “cmd” and hit the “Shift + Ctrl + enter” keys on the keyboard simultaneously to open it as administrator.
    Open Command Prompt as admin
    Open Command Prompt as admin
  2. Type the following commands and then hit enter to execute them.
    sfc /SCANFILE=C:\windows\explorer.exe
    sfc /SCANFILE=C:\Windows\SysWow64\explorer.exe
    Performing SFC Scan to fix the Operation did not complete successfully because the file contains a virus error
    Performing SFC Scan
  3. After the execution of these commands, a message will be displayed on the screen stating “Windows Resource Protection found corrupt files and successfully repaired them”.

Solution 4: Clear browsing history of Internet Explorer

From Control Panel:

  1. Press the “Win + R” keys on the keyboard to open the Run box and search for “Control Panel”.
    Typing in Control Panel
    Typing in Control Panel
  2. From the top-right corner, choose “View by Large icon” and then select “Internet Options”
    Internet Options
    Internet Options
  3. In the “General” tab, check the box parallel to “Delete browsing history on exit”.
    Delete browsing history on exit to fix the Operation did not complete successfully because the file contains a virus error
    Delete browsing history on exit
  4. Now apply the changes and restart your PC.

From the browser:

  1. Launch Internet Explorer on your computer and click on the “Setting cog” at the top-right of the screen.
  2. Hover your cursor on “Safety” and select “Delete browsing history”.
    Delete Browsing History
    Delete Browsing History
  3. Now check all the boxes displayed in the Window and click on the “Delete” button.
    Clear browsing history of Internet Explorer
    Clear browsing history of Internet Explorer

Solution 5: Use Disk Cleanup to clean your disks

  1. Press “Win+R” on your keyboard and search for “cleanmgr”.
    cleanmgr
    cleanmgr
  2. Now select the disk partition from the drop-down list and click on “OK”.
    Select the disk partition
    Select the disk partition
  3. Check the box parallel to “Temporary Internet files” and select “OK”.
    Temporary Internet files
    Temporary Internet files
  4. Now click on “Delete Files” and check if the issue persists.
    Delete Files to fix the Operation did not complete successfully because the file contains a virus error
    Delete Files

Solution 6: Perform a system restore

  1. Press the “Win + R” keys on the keyboard to open the Run box and search for “rstrui”.
    rstrui
    rstrui
  2. Select a restore point that was created before you came across the”Operation did not complete successfully because the file contains a virus” error.
    Perform a system restore to fix Operation did not complete successfully because the file contains a virus error
    Perform a system restore
  3. Click “Next” and then choose “Finish”.
  4. Check if the error is terminated after the system gets restored.

Solution 7: Perform a clean boot

  1. Press the “Win + R” keys on the keyboard to open the Run box and search for “msconfig”.
    Typing in "Msconfig"
    Typing in “Msconfig”
  2. Navigate to the “Services” tab and check the box parallel to “Hide all Microsoft services”.
    Hide all Microsoft services
    Hide all Microsoft services
  3. Now click on the “Disable All” option and apply the changes.
  4. Navigate to the “Startup” tab and click on “Open Task Manager”.
    Open Task Manager
    Open Task Manager
  5. Now right-click on each service one by one and select “Disable”.
    Disable to fix Operation did not complete successfully because the file contains a virus error
    Disable
  6. Now close the task manager and restart your PC to check if the error persists.

Solution 8: Reinstall the faulty software

  1. Press the “Win + R” keys on the keyboard to open the Run box and search for “Control Panel”.
    Typing in Control Panel
    Typing in Control Panel
  2. Now click on “Uninstall a program”.
    Uninstall a program
    Uninstall a program
  3. Locate the application you are having trouble with, right-click on it and select “Uninstall”.
    Uninstall to fix the Operation did not complete successfully because the file contains a virus error
    Uninstall
  4. After the problematic application is completely uninstalled, launch your browser and download the latest version of that application.
  5. Double-click on the downloaded executable and follow the on-screen instructions to install the program.
  6. After it is installed successfully, check and see if the error is rectified.

Solution 9: Reinstall third-party antivirus

The “Operation did not complete successfully because the file contains a virus” error mostly occurs on your computer if there is an issue with the third-party antivirus software installed on it. If the antivirus software is not functioning properly then the most efficient approach to fix it is by reinstalling the software. If, after reinstalling the software, the error persists, then we recommend you to disable the antivirus software and try to open the problematic file again. If this resolves your error then keep the things that way and do not enable the antivirus again but if you still encounter the error, then it is highly recommended to switch to a different antivirus. Many users have reported that they rectified this error from their computer completely by switching to BullGuard antivirus software.

Solution 10: Perform a full system scan

If you still see the “Operation did not complete successfully because the file contains a virus” error message on the screen, we recommend you perform a full system scan to locate and fix all the corrupted files in your system. An efficient approach to carry this task out is to use a third-party software called Restoro. It is an advanced system repair tool that will remove malware, replace damaged windows files, and restore your system performance to its maximum.

Solution 11: Reset your Windows

  1. Press “Win+I” on your keyboard to open “Settings” and navigate to “Update and Security”.
    Update and Security
    Update and Security
  2. From the left pane, navigate to “Recovery” and click on “Get started” under the “Reset this PC” section.
    Reset this PC
    Reset this PC
  3. Now select “Keep my files” and follow the onscreen instructions to reset your PC.
    Keep my files to fix the Operation did not complete successfully because the file contains a virus error
    Keep my files
  4. When the process is completed, open the problematic file to verify if the “Operation did not complete successfully because the file contains a virus” error is eliminated.

By now you should’ve managed to fix the error but if you are still facing it, make sure to contact us.

Back to top button
DMCA.com Protection Status