0x800704ec

Windows Defender '0x800704ec' Error: Fix in 4 Steps

Windows Defender won't start, showing 0x800704ec usually after a third-party antivirus left remnants. Here's how to clear them and get Defender running again.

You just uninstalled Norton or McAfee, or maybe you never installed anything but Windows Defender still won't open. When you click the shield icon or try to start Windows Security, you get a message with error code 0x800704ec. It's infuriating because you're trying to protect your PC and the built-in protection is the one failing.

I've seen this on both Windows 10 and Windows 11, usually right after uninstalling third-party antivirus software. Sometimes it happens after a failed update or a corrupted Windows Defender registration.

Root Cause: It's Almost Always Leftover Antivirus Junk

Third-party antivirus programs don't fully uninstall themselves. They leave behind filters, drivers, and services that disable Windows Defender. Windows sees those remnants and thinks another antivirus is still running, so it shuts Defender off to avoid conflicts. The 0x800704ec error is Windows saying "Defender can't run because something else is in the way."

Another trigger: you disabled Defender's services manually (maybe a "tweak" from some website) and now the service is stuck. The fix is the same either way—reset Defender to its default state.

The Fix: 4 Steps to Get Defender Running

These steps work on Windows 10 2004 and later, and all versions of Windows 11. You'll need admin rights.

Step 1: Check if a Third-Party Antivirus Is Still Installed

Open Settings > Apps > Installed apps. Look for anything like Norton, McAfee, Avast, AVG, Bitdefender, or Malwarebytes. If you see any, uninstall them first. Don't skip this—if the software is still there, nothing else will help.

If you already uninstalled but suspect remnants, download the official removal tool from the vendor's site. Norton has the Norton Removal Tool, McAfee has MCPR, and so on. These tools scrub the leftover drivers that regular uninstall misses.

Step 2: Reset Windows Defender's Services

Open Command Prompt as Administrator (search for "cmd", right-click, choose "Run as administrator"). Then run these commands one by one:

sc config WinDefend start= auto
sc config WdNisSvc start= auto
sc start WinDefend
sc start WdNisSvc

If you get an error like "service does not exist," don't panic. That's fixable too—I'll get to it. But most of the time, these commands set the services to start automatically and start them right away.

Step 3: Re-register Windows Defender with PowerShell

Sometimes the service exists but the registration is corrupt. Re-registering fixes that. Open PowerShell as Administrator and run:

Set-ExecutionPolicy -ExecutionPolicy Bypass -Force
Get-AppxPackage Microsoft.Windows.SecHealthUI | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppxManifest.xml"}

The first line just allows scripts to run. The second line reinstalls the Windows Security app (the interface that shows Defender). Don't worry about the ExecutionPolicy change—set it back to Restricted later if you want, but it's not critical.

Step 4: Restart and Re-check

Reboot your PC. When you log back in, try opening Windows Security. It should work now.

Still seeing the error? One more thing to try: run the Windows Defender offline scan from the Windows Security app, but you can't get into the app, so use this command instead:

MpCmdRun.exe -Scan -ScanType 2

That runs a full scan from the command line. It might take a couple hours, but it'll clean anything that's messing with Defender.

What If It Still Fails?

If you've done all four steps and the error persists, you're dealing with a deeper corruption. Here are two more things to try.

Run System File Checker

Open Command Prompt as Admin and run sfc /scannow. This repairs corrupted Windows system files. Let it finish—it can take 15–30 minutes. After that, reboot.

Use Windows Update to Reset Components

Sometimes the Windows Update service itself is stuck, and that blocks Defender updates. In an admin Command Prompt, run:

net stop wuauserv
net stop cryptSvc
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
net start wuauserv
net start cryptSvc

This resets the update cache. Then check for Windows updates and let them install. Often this clears the glitch.

If none of that works, your Windows installation might be too far gone. A system restore to a point before the error started is a solid bet. If you don't have a restore point, a Windows "Reset this PC" (keeping your files) is the nuclear option—but it works. I've done it more than once, and it's saved me hours of registry hunting.

One last tip: if you use a third-party antivirus, keep it. The error only happens when switching. If you're committed to Defender, good—it's solid. But if you switch again, uninstall properly with the vendor's tool. That alone prevents this whole mess.

Related Errors in Cybersecurity & Malware
0X80090328 SEC_E_CERT_EXPIRED (0X80090328) – Three Fixes That Work Fix Browser Dangerous Site Warning False Positive 0X000020E7 Active Directory Error 0X000020E7: Security Modify Fix 0X8009033F SEC_E_SHUTDOWN_IN_PROGRESS (0x8009033F) Fix That Works

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.