operation did not complete successfully because the file contains a virus

Can’t open a tệp tin because Windows 10 detects a virus in the tệp tin location? Learn here how to lớn solve the “Operation did not complete successfully” error with 7 easy methods.

If you’ve been on the mạng internet for a while now, you probably downloaded something from a shady trang web. Maybe you wanted to lớn get an application for không tính tiền to lớn try it before committing to lớn a purchase or just clicked on a misleading liên kết. Whether or not the tải về is legitimate, Windows 10 may flag it as an infected tệp tin.

Bạn đang xem: operation did not complete successfully because the file contains a virus

This error shows up when Windows 10’s built-in antivirus application, Windows Defender, detects a tệp tin as dangerous. The tệp tin may contain a false positive or actual malware. In this article, we’ll explore methods to lớn remove malware from a downloaded tệp tin, or bypass the warning if it falsely detects a safe tệp tin.

Let's get started!


Jump To:

  1. How to lớn Fix Operation Did Not Complete Successfully Because the File Contains a Virus
  2. Method 1. Temporarily Disable Windows Defender
  3. Method 2. Turn Off Third-Party Antivirus Program
  4. Method 3. Add the File or Folder to lớn the Exclusions List
  5. Method 4. Repair the File Explorer
  6. Method 5. Fix Windows Backup
  7. Method 6. Run the Disk Cleanup Utility
  8. Method 7. Run an Antivirus Scan

What Causes the “Operation Did Not Complete Successfully” Error Message?

Depending on your situation, the error message could come up for a few different reasons.

  1. You downloaded a genuine tệp tin, but Windows Defender detects a virus. If you downloaded something from a genuine trang web, it’s possible that Windows Defender detected a false positive. This is a general issue with all antivirus software — if code or behavior matches a known malware, Windows Defender may flag the tệp tin as dangerous.
  2. You downloaded an infected file. Typically, misleading links and malicious users spread files that appear genuine but contain malware. If this happens, Windows Defender gives you a warning after protecting your computer.

The methods below will guide you to lớn open a tệp tin and bypass the  “Operation did not complete successfully because the tệp tin contains a virus” message.

How to lớn Fix Operation Did Not Complete Successfully Because the File Contains a Virus

Before proceeding, keep in mind that your computer may be in danger. If the tệp tin does contain malware, it may be too dangerous to lớn open the tệp tin. If you’re not certain that the tệp tin you downloaded is genuine, run rẩy an antivirus scan and find a new, legitimate tải về.

Method 1. Temporarily Disable Windows Defender

If you believe that the tệp tin you downloaded is genuine, you can bypass the “Operation did not complete successfully because the tệp tin contains a virus” warning. To tự this, you’ll have to lớn temporarily disable Windows Defender, and open the tệp tin while it’s turned off.

Option 1. Disable Windows Defender in Settings

The fastest way of disabling the built-in antivirus is going to lớn the Settings thực đơn.

  1. Click on the Windows icon in the bottom left of your screen to lớn bring up the Start menu.
  2. Choose Settings, or alternatively use the Windows + I shortcut.
    windows start menu
  3. Click on the Update & Security tile. This is where you can find most of your security settings.
    update ad security tile
  4. Here, switch to lớn the Windows Security tab, and then click on Virus & threat protection.
    virus and threat protection
  5. First, click on the Manage settings liên kết under the Virus & threat protection settings header. You’ll be redirected to lớn a new page. Here, click on the Real-time protection toggle to lớn turn off Windows Defender.

Try opening the tệp tin again. If you still get an error, perform the same steps and turn off Cloud-delivered protection as well. If you’re still unable to lớn bypass the warning, you may have to lớn disable Windows Defender using the Registry.

Option 2. Disable Windows Defender in the Registry

Some users may not be successful in disabling Windows Defender antivirus software the traditional way. If you can’t perform the method above, try and turn off the application using the Registry Editor.

  1. Open the tìm kiếm bar in your taskbar by clicking on the magnifying glass icon. You can also bring it up with the Windows + S keyboard shortcut.
  2. Type Registry Editor in the tìm kiếm box and click on the first matching tìm kiếm result.
    registry editor
  3. Navigate to lớn the following key, or copy-paste it in the address bar of the Registry Editor: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender
  4. Locate a registry entry named DisableAntiSpyware, then double click on it.
    disable antispywaare registry
  5. If you don't see this key, right-click on any empty space and choose NewDWORD (32-bit) Value. Name the key DisableAntiSpyware, and then double-click on it to lớn open its properties.
    registry editor: disable antispyware
  6. Set the Value data to lớn 1 in order to lớn disable Windows Defender and Antimalware Service Executable (MsMpEng.exe) in Windows 10.
    registry editor, disable antispyware
  7. Exit the Registry Editor and restart your computer. You may notice improvements with your device's performance.

Once again, let us remind you that it's risky to lớn operate your device without having an antivirus application installed. You may become vulnerable to lớn malware, hackers, and other types of cyberattacks. We highly recommend using Malwarebytes if you need a không tính tiền and lightweight solution. We also offer Malwarebytes Premium for the best market price.

Method 2. Turn Off Third-Party Antivirus Program

Antivirus applications are known to lớn cause issues on computers by blocking apps and services from running properly. You can test if the antivirus program you’re using at the moment is causing the error by temporarily disabling it.

Xem thêm: nghị luận bài thơ viếng lăng bác

Note: This method is not recommended as it is unsafe to lớn use your computer without protection. Only proceed if you’re aware of the possible risks and have a backup of your system to lớn revert any damage that may happen.

  1. Right-click on an empty space in your taskbar and choose Task Manager. If the Task Manager launches in compact mode, make sure to lớn expand details by clicking on the “Mode details” button.
    task manager
  2. Switch to lớn the Start-up tab using the header thực đơn located at the top of the window. Find your antivirus application from the list and select it by clicking on it once.
    task manager
  3. Click on the Disable button now visible in the bottom-right of the window. This will disable the application from launching when you start your device.
  4. Restart your computer.

Method 3. Add the File or Folder to lớn the Exclusions List

If you want to lớn bypass the warning without having to lớn turn off Windows Defender or your third-party antivirus, you can. Simply add the tệp tin itself, or the entire thư mục containing it to lớn the exclusions list. By doing ví, Defender won’t look for any suspicious files in that specific directory.

  1. Open the File Explorer and navigate to lớn the file’s location. Click on the address bar and copy the full tệp tin path to lớn the tệp tin with the Ctrl + C keyboard combination.
  2. Open the tìm kiếm bar in your taskbar by clicking on the magnifying glass icon. You can also bring it up with the Windows + S keyboard shortcut.
  3. Type in Windows Security and launch it from the tìm kiếm results.
    windows security
  4. Switch to lớn the Virus & Threat Protection tab using the trang chủ screen or the thực đơn in the left-side pane. Here, click on the Manage settings liên kết under Virus & threat protection settings.
    virus and threat protection
  5. Under Exclusions, click the Add or remove exclusions liên kết. You'll be redirected to lớn a new page.
    add and remove exclusions
  6. Click the Add an exclusion button. From the drop-down thực đơn, select File or Folder, depending on what you want to lớn open.
    add an exclusion
  7. Paste the path you copied from the address bar by pressing the Ctrl + V keys. Click the Select Folder button when you're done.
    add an exclusion

After adding the tệp tin as an exclusion, you’ll be able to lớn open it. We recommend running an antivirus scan afterward to lớn ensure no real malware was in the tệp tin.

Method 4. Repair the File Explorer

It’s possible that the “Operation did not complete successfully because the tệp tin contains a virus” error message shows up because of a File Explorer problem. In this case, follow the steps below to lớn repair the File Explorer.

  1. Open the tìm kiếm bar in your taskbar by clicking on the magnifying glass icon. You can also bring it up with the Windows + S keyboard shortcut.
  2. Type Command Prompt in the tìm kiếm box. When you see it in the results, right-click on it and choose Run as Administrator. If you need help, kiểm tra out our How to lớn make a local user an administrator in Windows 10 guide.
    add an exclusion
  3. When prompted by the User Account Control (UAC), click Yes to lớn allow the tiện ích to lớn launch with administrative permissions.
  4. Once the Command Prompt window is open, type in the following commands and press Enter after each line to lớn execute them: 
    • sfc /SCANFILE=c:\windows\explorer.exe 
    • sfc /SCANFILE=C:\Windows\SysWow64\explorer.exe
      sfc/ scannow command prompt
  5. After both commands have been executed, restart your computer and see if you’re able to lớn open the tệp tin.

Method 5. Fix Windows Backup

In some cases, the error message shows up because of temporary Internet files and cache being stored in your backups. You can easily fix this by performing the next steps.

  1. Press the Windows + R keys on your keyboard. This is going to lớn bring up the Run utility.
  2. Type in “control” without the quotation marks and press the Enter key on your keyboard. This will launch the Control Panel application.
    run dialog box, control
  3. Change the view mode to lớn Large icons, and then click on the Internet Options button.
    control panel mạng internet options
  4. Stay on the General tab. Click on the Delete… button under the Browsing history heading. A new window will open.
    internet options, general tab
  5. Uncheck the Preserve Favorites trang web data option.
    preserve favorite trang web data
  6. Next, kiểm tra the following options, and then click on the Delete button: 
    • Temporary Internet files and trang web files 
    • Cookies and trang web data 
    • History 
    • Download History
  7. Restart your computer and see if you’re able to lớn open the tệp tin without a warning message. If not, you can try resetting your browser and clearing browser data, cookies, and browsing history.

 Method 6. Run the Disk Cleanup Utility

Windows 10 often creates temporary files and folders. If they accumulate, it can affect your computer and may cause misleading errors. Delete junk files using the Disk Cleanup utility to lớn save space and fix computer problems.

  1. Open the tìm kiếm bar in your taskbar by clicking on the magnifying glass icon. You can also bring it up with the Windows + S keyboard shortcut.
  2. Type in Disk Cleanup and click on the first tìm kiếm result.
    disk clean up
  3. Select the Windows 10 system drive, and then click the OK button. Usually, the system is installed on disk C:.
    disk clean up C
  4. In the new window, you’ll see all space taken by temporary files. Make sure that Temporary Internet Files and Temporary Files are selected. You may also delete other junk files, such as Thumbnails or DirectX Shader Cache. When you're done selecting what you want to lớn remove, click OK.
    delete temporary files
  5. Click on the Delete Files button in the dialog box that pops up. The removal process will start and không tính tiền up space on your device.
    delete temporary files

Method 7. Run an Antivirus Scan

We recommend running a security scan to lớn ensure that you don’t have a malicious tệp tin. It can also detect if your system is not currently infected by malware. We’ll be using the built-in Windows Defender to lớn perform a system scan, however, a more focused third-party solution may work better.

  1. Open the tìm kiếm bar with the Windows + S keyboard shortcut. Type Windows Security and launch it from the tìm kiếm results.
  2. Switch to lớn the Virus & Threat Protection tab using the trang chủ screen or the thực đơn in the left-side pane. Click on the Scan Options liên kết.
    virus and threat protection
  3. Select the Full scan option. This is going to lớn kiểm tra every single tệp tin on all of your drives to lớn ensure no threats can hide. Take note that this scan may last over 1-2 hours, depending on how many files you have on your system.
    scan computer
  4. Click on the Scan now button to lớn begin the scan. If a threat is detected, Windows 10 will automatically quarantine or remove it entirely. You can review the scan results afterwards.

After completing these steps, you may be able to lớn successfully open the problematic tệp tin. If the tệp tin has been removed by Windows Defender, it’s likely that the tệp tin was unsafe and misleading to lớn begin with. In this case, finding a different tải về is your best bet.

Final Thoughts

That wraps up the guide to lớn opening a tệp tin even if Windows 10 detects a virus in the tệp tin directory. We hope this helps.

In the future, be careful with what you tải về from the mạng internet. Unofficial websites often hide malware and potentially unwanted programs (PUPs) in their downloads. Avoid these websites to lớn lower the possibility of this error from happening again.

Xem thêm: các tập phim có sự tham gia của park bo gum

Our Help Center offers hundreds of guides to lớn assist you if you’re in need of further help. Return to lớn us for more informative articles, or get in touch with our experts for immediate assistance.

One More Thing

Would you lượt thích to lớn receive promotions, giao dịch, and discounts to lớn get our products for the best price? Don’t forget to lớn subscribe to lớn our newsletter by entering your gmail address below! Be the first to lớn receive the latest news in your inbox.

You May Also Like

» How To Fix System Service Exception Error In Windows 10
» Fixed: DirectX Encountered an Unrecoverable Error
» Slow Internet on Windows 10? Here’s How To Solve It