Did you get the “ operation did not complete successfully because the file contains a virus” error when you downloaded a file online? We have the fixes for this error.

virus

Sometimesthe operation did not complete successfully because the file contains a virus”  is an error shown when downloading something. It can be a false positive, or the file might be malicious. You could take various steps, like temporarily disabling windows defender and windows firewall registry to run the file. You can also repair the file explorer to run the file. Verify the file’s security and that it is free of malware.

Let’s go on and examine the error’s sources and solutions.

Causes of “Operation did not complete successfully because the file contains a virus” error

The error notice could arise for a few different reasons depending on the circumstances.

False Positive

Even though you downloaded a clean file, Windows Defender finds a virus. Windows Defender likely reported a false positive if you downloaded something from a dependable website.

antivirusAll antivirus software has this problem; if a file’s code or behavior resembles that of known malware, Windows Defender may flag it as potentially harmful.

Malicious File

The operation could not be completed because the file contained a virus. Usually, rogue users and deceptive links propagate files that look legitimate but contain malware. When this occurs, Windows Defender warns you after securing your PC.

See Also: Win32:BogEnt – Virus Removal Guide (Updated 2024)

Methods to fix the “Operation did not complete successfully because the file contains a virus” error

If you are sure the apps you downloaded are legitimate, let’s move on to the fixes for this message error.

Complete a Full Scan

Firstly, we advise doing a complete PC scan. You can locate any potential virus in your system using this technique.

  1. Window Security may be found by typing it into the Start menu.scan
  2. Select Scan from the Virus and Threat Protection menu.scan now

After choosing the Deep Scan option, click the “Scan Now” button.

Temporarily disable Windows Defender

The operation did not complete the virus Windows 10 bypass. Simple errors like these are expected, given that Windows Defender’s complete protection settings can result in false positives. However, until Windows Defender is disabled, there is no practical way to launch the file detected in Windows and Windows Defender.

Turn it on as soon as possible because leaving your computer unsecured for an extended period is always risky.

  1. On your taskbar, right-click the shield symbol and select Open.window defender
  2. Turn off Real-time and Cloud-based protection when Windows Defender Security Center opens by clicking the shield symbol below the home button and opening the Virus & threat protection options.real time
  3. Go to the browser icon (second from the end) and deactivate the option labeled “Check apps and files.”check apps

If you believe SmartScreen may interfere with your ability to complete the task, you can also turn it off.

Firewall Windows Registry

You can occasionally be unable to turn off Windows Defender using Settings. Numerous customers have complained that the application can only be briefly disabled before re-enabling itself afterward because the operation did not complete virus avast. If you intend to deactivate the application fully, you must modify it using Registry Editor. 

You can adhere to the guidelines provided below.

  1. To launch the Run Utility, use Windows + R on your keyboard. Enter regedit and then press the OK button. regedit
  2. Enter the path mentioned below in the Registry Editor’s address bar: ComputerHKEY LOCAL MACHINESOFTWAREPoliciesMicrosoftWindows Defender
  3. Locate the option to disable anti-spyware.

Right-click the vacant space and select New > DWORD 32-bit value if the choice isn’t immediately apparent.

Rename the key with the name “DisableAntiSpyware” and click on it.change value of disableantispyware to 1

To save your changes, modify the Value Data to 1 and press OK.

Disabling any third-party Antivirus program

Antivirus software is known for causing computer problems by preventing the normal operation of apps and services. The virus sometimes shows the message that avast this file might be dangerous. Still, by momentarily turning off your antivirus software, you can determine whether the issue is caused by it.

remove antivirus

Note that using your computer without protection is dangerous, so this method is not advised. Only move further if you know the potential risks and have a system backup to undo any possible damage.

  1. Select Task Manager by right-clicking an empty area of your taskbar. Make sure to click the “Mode details” button to expand details if the Task Manager runs in compact mode.task manager
  2. Choose the Start-up tab from the headline bar at the window’s top. Locate your antivirus program on the list, then choose it with a single click.disable

Click the Disable button located in the bottom right of the window. Doing this can prevent the program from starting when your device turns on. Switch off your computer. Restart it after that.

See Also: 3 Ways To Fix ERR_NAME_RESOLUTION_FAILED Error

Adding the file to the exception list

You can disregard the warning without disabling Windows Defender or your third-party antivirus program. Add the file—or the folder containing it—to the exclusions list. If you do this, the defender won’t search that particular directory for any suspicious files.

  1. Enter Windows Security in the search box once it is open.

windows security

2. Malware and Spyware Protection can be selected in the left side panel. 

Choose Manage Options from the list of settings for malware and threat prevention.manage options

3. Choose Add or Remove exclusion from the Exclusions section. Click the “Add an exclusion” button.add file

Open the desired program file by navigating to it.

Repair the File Explorer

Even the Windows Explorer process can occasionally be detected as potentially harmful software, preventing you from properly using your computer and displaying the error message “Operation did not complete successfully because the file contains a virus.” Since explorer.exe is a legitimate Windows process, turning off your antivirus software or adding it to your exceptions list might not be able to fix the issue.

  1. Click the Start button and enter Command Prompt. Click on it with the right mouse button, then choose Run as Administrator.command prompt
  2. Select Yes to grant administrator access if the User Account Control box pops up. Enter the following codes into the Command Prompt box now. Make sure to press Enter to carry out each command.command prompt

The command “sfc /SCANFILE=c:windowsexplorer.exe” 

explorer.exe in the following directory: C: WindowsSysWow64

See Also: Windows Resource Protection Could Not Perform The Requested Operation

Run Disk Cleanup

Your caches, cookies, and browsing history stored in your backup might occasionally become corrupted or cause issues. The warning notice may consequently appear. You can delete these files by following the instructions listed below.

  1. Enter “Disk Cleanup” in the start menu.disk cleanup
  2. Select the system drive. In most cases, your C Drive is where it is installed.select disk c
  3. On the OK, hit. In the pop-up window, check the boxes next to “Temporary Internet Files and Temporary Files.”ok

Select “Ok” from the menu.

Fix Windows Backup

Sometimes, the temporary Internet files and cache preserved in your backups cause the error message to appear. The actions listed below can enable you to fix this swiftly.

  1. Press the Windows and R keys on the keyboard. The Run application will start up as a result.  After typing “control” on the keyboard, press enter. The Control Panel program will open as a result.type-control-panel-1
  2. Click on Internet Options after switching the view mode to Large Icons.internet options
  3. Keep clicking the General tab. Under the header “Browsing history,” select Delete… The window will change.delete.
  4. The Preserve Favorites Website Data checkbox must be unchecked.preserve data

Keep data from a favourite website.

After that, select the Delete button after checking the following boxes:

  •  Website files and temporary Internet files
  • Site data and cookies
  •  Save the History

See Also: Fix: This File Does Not Have An App Associated With It For Performing This Action

FAQs

Can a virus survive a hard reset?

A factory reset, commonly referred to as a Windows Reset or a reformat and reinstall, will remove all data and all but the most advanced viruses from the computer's hard disc. Viruses cannot affect the computer directly, and factory resets remove them from the machine's memory.

Can a virus cause permanent damage to the PC?

A computer virus can't harm computer hardware because it is only code. However, it may result in situations where computer-controlled hardware or other equipment is harmed. For instance, a virus can tell your computer to disable the cooling fans, which would lead to overheating and hardware damage.

Can a virus steal files?

One of the most dangerous and expensive effects of malware is information theft. Suppose malware such as spyware and trojans has been placed on your device. In that case, cybercriminals may be able to gather your private and corporate info to sell to third parties.

How do I make avast ignore a file?

Sometimes the action can't complete because the file is open in avast antivirus. To solve that, Open Avast Antivirus and select Settings from the menu. Click Add exception after selecting General Exceptions. Add an exception using one of the methods listed below: Click Add exception after entering the URL or the path to the particular file or folder in the text field.

Conclusion

It is easy to solve the issue of “Operation did not complete properly because the file contains a virus.” Simply perform each action individually to see how quickly the issue is resolve. For your reference, we’ve also covered a few generally posed questions.

See Also: Fix: This Operation Has Been Cancelled Due To Restrictions In Effect On This Computer