Error “Virus scan failed” when downloading files

When you download a .exe, .pdf, .png, .jpg, or any other file type, the error “Failed – Virus scan failed” may appear in your browser, and the file may not be downloaded.

virus scan filed - scanwithantivirus

If you open the Security Providers section in Windows Security, Microsoft Defender Antivirus may be turned on.

Cause

The “Virus scan failed” error occurs because of the remnant registry entries related to third-party antivirus software whose IOfficeAntivirus (IOAV) module is missing or doesn’t work. In most cases, the culprit is incomplete uninstallation of third-party antivirus (usually, McAfee antivirus) or an expired antivirus subscription.

Resolution

Option 1: Uninstall third-party antivirus cleanly

If you have been using McAfee and then uninstalled it or its subscription expired, you can uninstall it using the “McAfee Consumer Product Removal” tool (MCPR). MCPR can be downloaded from the McAfee link below.

McAfee KB – How to remove McAfee products from a Windows PC (TS101331)

McAfee MCPR tool screenshot



Reboot Windows when prompted.


Option 2: Disable antivirus scanning during downloaded

If the earlier method doesn’t help, as a workaround, you can turn off the scanning of downloaded files (a.k.a; attachment manager scanning). This can be accomplished using a registry edit. Note that this registry edit doesn’t disable your antivirus’s real-time protection feature.

  1. Start the Registry Editor by running regedit.exe.
  2. Go to the following registry branch:
    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments

    (If you do not see the Attachments subkey, create it by right-clicking Policies, selecting New, clicking Key, and then typing Attachments as the key name.)

  3. Right-click the ScanWithAntiVirus DWORD value, and then click Modify.
  4. In the Value data box, type 1, and then click OK.virus scan filed - scanwithantivirus - regedit
  5. Log off and log in to Windows to make the change take effect.
    After applying the above registry edit, Windows doesn’t call the registered antivirus programs when file attachments or downloads are opened.
  6. Open or save the program or file that you failed before.

Automate the above steps

To automate the above registry setting, download scanwithantivirus_turn_off.zip, unzip it, and run scanwithantivirus_turn_off.reg. Click Yes to confirm. Then, log off and log back into your user account.

Note: Microsoft suggests you change the value of “ScanWithAntiVirus” to 3 to enable the virus scan right after you open or save the program or file.


One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded Winhelponline.com in 2005.

Leave a Comment