“Operation did not complete successfully” error is a very common one that users often run into on Windows 10. Not being able to open a file or complete a certain operation when you need to, can be very tiring. If you cannot open a file because Windows 10 detects a virus in the file location, here is your chance to learn how to solve the error.
As frustrating as running into this error can be, it does not just appear from nowhere. If you are a computer user that has been on the internet for a while now, you probably downloaded something from a shady website. This could be anything, you know. Perhaps you wanted to get a supposed license-locked application for free to try it before committing to a purchase, or entirely trying to get a hacked one entirely that would never require you to pay but still allows access to the full features. On another note, it could be that you just clicked on a misleading link. Whether or not the download is legitimate, Windows 10 flagging it as an infected file is not uncommon.
Regardless of what happened, this error appears when Windows 10’s built-in antivirus application known as Windows Defender detects a file as being fishy or to put simply; dangerous. The file may contain a false impression of malware or actual malware. Notwithstanding where the issue came from, we will explore methods to remove malware from a downloaded file or bypass the warning if it falsely detects a safe file in this post.
Causes of the “Operation Did Not Complete Successfully” error message on Windows 10
There are different reasons you would see the error message come up when you are attempting to do some things on your computer. While we have given you some hints about the genesis of this problem, here, we are providing descriptive information about them. Ideally, the error could arise due to two reasons stated below.
- You downloaded a genuine application or file but Windows Defender detects a virus – a false positive
The problem could arise even when the file or program you downloaded was from a genuine website, with no malware within it, yet Windows Defender still sees it as something dangerous to the operating system and user files. Such is seen as Windows Defender detecting a false positive. While you would definitely frown upon this, the fact is this is a general issue associated with all antivirus software. Hence, when some behavior or code matches a known malware, the Windows Defender antivirus may flag the file as dangerous.
- You downloaded an infected file
When you are looking to obtain free stuff on the internet, you need to watch your back. Ideally, malicious internet users spread files that appear genuine but contain malware through a variety of methods such as putting up cracked software, misleading links, and the like. When you run into one of these and download bad files or programs onto your computer, Windows Defender protects the computer and gives you a warning.
Now with your system already being protected, you do not want Windows Defender to further block you from accessing files and doing other activities on your system, but it still does. Having said all that, the methods below will guide you on how to open a file and bypass the “Operation did not complete successfully because the file contains a virus” message.
How to Fix Operation Did Not Complete Successfully Because the File Contains a Virus
It is noteworthy before proceeding that for you to be getting such an error message, your computer may be in danger. If the file does contain serious malware, it may be too dangerous to open the file. In the event that you are not certain that the file you downloaded is genuine, run an antivirus scan to get the health status of the file. When things go to the red zone, from the result of the scan, simply get rid of the file and find a new, legitimate one to download.
- Method 1. Disable the Windows Defender program temporarily
Sometimes, Windows Defender or any other antivirus blocking you from accessing a certain file got a false malware detection, and hence, the access block is much unwarranted. So when you have the belief that the file you downloaded is genuine, and contain no malware script, you can bypass the “Operation did not complete successfully because the file contains a virus” warning. To do this, you just have to disable the Windows Defender program temporarily and open the file while the program is turned off.How to Share Calendar on Outlook
How to disable Windows Defender from System Settings
The Settings menu provides the fastest way of disabling the built-in antivirus that comes with the Windows operating system; Windows Defender. To do this, follow the steps below.
- Get started by clicking on the Windows icon in the bottom left of your screen to bring up the Windows Start menu.
- Select Settings, or alternatively use the Windows + I shortcut keys.
- Now click on the Update & Security tile on the left menu. This is where you can find most of your security settings.
- On the next screen, switch to the Windows Security tab, and click on Virus & threat protection.
- Now go ahead and click on the Manage settings link located under the Virus & threat protection settings header. This will take you to a new page.
- Complete the process by clicking on the Real-time protection toggle to turn off the Windows Defender program.
Having disabled the antivirus program, try opening the file again. If you still get an error, follow the same steps above again but this time, turn off Cloud-delivered protection. If you are still unable to get through the warning and open the file, you may have to disable the Windows Defender program using the Registry.
How to disable Windows Defender through the Registry
It is possible to not be able to disable Windows Defender antivirus software through the traditional way provided above. That is not the problem if you found yourself here. Try to turn off the application using the Registry Editor by following the steps below.
- Click on the Windows Start key or use the Windows + S keyboard shortcut to bring up the search bar.
- Now that you are there, type Registry Editor in the search box and select the first matching search result.
- Now navigate and copy-paste the following key in the address bar of the Registry Editor:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender
- Locate the DisableAntiSpyware registry entry and double-click on it.
- In case you do not see the key above, right-click on any empty space and select New → DWORD (32-bit) Value.
- Name the key DisableAntiSpyware, and then double-click on it to open its properties.
- Set the Value data to 1 in order to disable Windows Defender (MsMpEng.exe) in Windows 10.
- Finally, close the Registry Editor and reboot the computer. You may likely notice improvements in the device’s performance afterward.
Warning:
It is risky to operate your device without having an antivirus application in operation. You may become exposed and vulnerable to malware, spamming, hacking, and other types of cyberattacks. We highly recommend using a malware protection program even when you disable the Windows Defender.
- Method 2. Disable any third-party antivirus program
Although antivirus applications are there to provide you with real-time protection against all kinds of malware and attacks, they are also known to cause issues on computers by blocking apps and services from running properly without informing you. And you can find out if the file is inaccessible due to the antivirus program you are using by temporarily disabling it.
We need to stress again that this method is not recommended as it is unsafe to use your computer without antivirus protection. Only proceed with it if you are aware of the possible risks and have a backup of your files and programs to revert any damage that may happen.
To disable the third-party antivirus currently running on your system, follow the steps below.
- Search for, and open the Task Manager program. If the program launches in compact mode, be sure to expand the details by clicking on the Mode details button.
- Use the window top header menu to switch to the Start-up tab.
- Locate the antivirus application from the programs list and select it by clicking on it once.
- Now click on the Disable button that has now appeared active in the bottom-right of the window. This will disable the application from launching when you start your device.
- Complete the process by restarting your computer.
- Method 3. Add the file or program to the Exclusions List
You can bypass the warning without having to turn off Windows Defender or your third-party antivirus. This can be achieved by simply adding the file itself, the entire folder containing it, or the program to the exclusions list. By doing so, Windows Defender would assume that you know what you are doing and exclude that file, folder or program in its usual malware search exercises. The steps involved are highlighted below.
- Open the File Explorer and find your way to the file’s location.
- Now click on the address bar and copy the full file path to the file.
- Open the search bar in your taskbar by using the Windows + S keyboard shortcut.
- Type in Windows Security and launch it from the search results.
- Go on and Switch to the Virus & Threat Protection tab using the home screen or the menu in the left-side pane.
- From there, click on the Manage settings link under Virus & threat protection settings.
- Then click the Add or remove exclusions link under Exclusions. This will take you to a new page.
- Now click the Add an exclusion button. From the drop-down menu, select File or Folder, depending on what you want to open.
- Finally, paste the path you copied earlier and click the Select Folder button when you are done.
After adding the file as an exclusion, you’ll be able to open it. We recommend running an antivirus scan afterward to ensure no real malware was in the file.
- Method 4. Repair the File Explorer
A File Explorer problem can be the genesis of the “Operation did not complete successfully because the file contains a virus” error message. In the event of this, follow the steps below to repair the File Explorer application.
- Bring up the search bar by using Windows + S keyboard shortcut.
- Type CMD in the search box, and as you see it among the search results, right-click on it and choose Run as Administrator.
- Click Yes to allow the app to launch with administrative permissions when you are prompted by the User Account Control (UAC).
- As the Command Prompt window opens up, type in the following commands and press Enter after each line to execute them:
sfc /SCANFILE=c:\windows\explorer.exe
sfc/SCANFILE=C:\Windows\SysWow64\explorer.exe
Once both commands have been executed, restart your computer and see if you are able to open the file.
Final Thoughts
And that is how you can fix the issue of the “Operation did not complete successfully” error message on Windows 10. To avoid running into this problem again in the future, be careful with what you download from the internet. Free download websites often hide malware and potentially unwanted programs (PUPs) in their files. Avoid downloading from unofficial websites to avoid running into such errors again.