If Windows Security says a file can’t be opened, check whether it was blocked, quarantined, or stopped by Controlled folder access; only the first needs Unblock, the second a restore, and the third an app allowance. Fixing the wrong one can leave malware active, hide the file again, or keep a trusted document locked out. This guide shows how to tell each case apart in Windows 10 and 11, then apply the right repair without turning security off.
What the error usually means
“Can’t be opened” is a symptom, not one problem. The file may be in Protection history because Defender quarantined it, it may be blocked by ransomware protection in Controlled folder access, or Windows Security may have flagged it during access and is still holding it back. Start with Virus & threat protection, then open Protection history.
Say your about 18 MB ZIP opens from Downloads but fails after you move it to OneDrive. That points away from a damaged file and toward a protection rule, especially if the message appears only after the move. Suppose a Windows Security settings file opens from one user profile but not after switching to a different local account on the same PC. That often means the file is tied to an allow/block decision in Windows Security, not the document itself.
📊 The Windows Security app page is available on Windows 11 and Windows 10. Source: Microsoft.
Likely causes
Often, one of a few things is happening. A detection landed in quarantine. Controlled folder access stopped an app from changing a protected file. Real-time protection flagged the file as it was opened or run. Less commonly, the file needs a deeper scan or an offline scan before Windows will trust it again.
Quarantined item or allowed threat
- Open Windows Security.
- Select Virus & threat protection.
- Choose Protection history.
- Look for a quarantined item or an Allowed threat.
- If you trust the file, restore it or reverse the allow decision. If you do not trust it, leave it blocked.
Protection history is where quarantined items and allowed threats may appear. Allowed threats are items Windows Security identified as threats but the user chose to allow. If you reverse an allowed threat with Don't allow, Windows Security will act on it again the next time it sees the threat.
Controlled folder access block
- Open Windows Security.
- Select Virus & threat protection.
- Under Ransomware protection, open Manage ransomware protection.
- Check whether Controlled folder access is on.
- Use Allow an app through Controlled folder access for a trusted app, or move the file to a folder that is not protected.
Controlled folder access helps prevent unknown apps from changing files in protected folders. It can block write attempts even when the file itself is not infected. That is why a document may open from one location but fail to save or update in Documents, Pictures, or another protected folder.
Real-time protection flag
- Open Windows Security.
- Select Virus & threat protection.
- Check Current threats and Protection history for the item.
- Run a Quick scan first, then a Custom scan on the exact file or folder if needed.
- If the warning returns after rescanning, leave the file blocked and replace it with a clean copy from a trusted source.
Real-time protection watches files and programs as Windows opens them or runs them. It can switch back on by itself after a short time if you turn it off, so a temporary shutdown is rarely the right fix. If the same file keeps triggering detections, treat the warning as valid until a deeper check says otherwise.
Deeper scan needed
- Open Windows Security.
- Select Virus & threat protection.
- Open Scan options.
- Choose Full scan if you want every file and program checked, or Custom scan if you want selected files and folders checked.
- If the file still acts suspicious, run Microsoft Defender Antivirus offline scan.
The offline scan starts after a restart, before Windows loads. That makes it useful when a file or related threat keeps coming back during normal startup. You can view offline-scan results in Protection history. (Microsoft Support)
Windows Security decision table
| Symptom | Likely Windows Security cause | Safest fix |
|---|---|---|
| The file vanished after a detection alert | Quarantined threat | Open Protection history and restore only if the file is trusted |
| Protection history shows an item under Allowed threats | User already allowed a detection | Choose Don't allow if the file is unsafe, then rescan |
| A document opens, but save or edit fails in Documents or Pictures | Controlled folder access block | Allow the trusted app through ransomware protection or move the file out of the protected folder |
| The warning appears while opening the file, not after a download | Real-time protection flag | Run a quick scan, then a custom scan on that file or folder |
| The same file keeps triggering alerts after a rescan | Likely unsafe file | Leave it blocked and replace it with a clean copy from a trusted source |
| The file works from one account but not another | Mixed quarantine or allow history across accounts | Check Protection history in the active account and the source path before restoring anything |
| The file fails after being copied from a USB drive or synced folder | Detection during access or a blocked write attempt | Scan the copied file with Custom scan before opening it again |
| The issue appears after a restart and keeps returning | Persistent threat that normal Windows startup loads too early | Run Microsoft Defender Antivirus offline scan |
| The file is still blocked but no item shows in Protection history | Controlled folder access or another access rule | Check ransomware protection settings, not quarantine |
How to check Virus & threat protection
Open Windows Security and go to Virus & threat protection. That page shows Current threats, settings, updates, and ransomware protection sections. Current threats shows the last scan time, scan duration, and number of files scanned. On Windows 10 and Windows 11, the labels may move a little, but the page is in the same app.
If you only need a fast check, use Quick scan. If you need to inspect every file and program, use Full scan. If the problem file is in a known folder, Custom scan is the cleaner choice because it checks only what you select.
- Open Windows Security.
- Select Virus & threat protection.
- Review Current threats and the last scan details.
- Select Scan options.
- Choose Quick scan, Full scan, or Custom scan as needed.
How to restore or reverse a quarantined item
If Protection history shows the file in quarantine and you trust its source, restore it there. If it appears as an allowed threat, use Don't allow to reverse that choice. Only do that when you have a good reason to trust the file, such as a verified installer or a known document from a safe source.
A common first-timer mistake is restoring every blocked download because it has a familiar name. File names are easy to copy. Trust the source, not the label. If the detection came from an email attachment, a sketchy installer, or a file that changed size unexpectedly, leave it blocked.
- Open Windows Security.
- Select Virus & threat protection.
- Open Protection history.
- Select the item.
- Choose Restore for a trusted file or Don't allow for an unsafe one.
How to fix a Controlled folder access block
Controlled folder access is part of ransomware protection, and it can stop an unknown app from changing files in protected folders. That is common when a trusted app is new, unsigned, or moved to another folder. The fix is to allow the app, not to disable security across the board.
If the file is a document and the editor cannot save it, the problem may be the editor rather than the document itself. If the file is in a synced folder, check whether the sync client is the app being blocked.
- Open Windows Security.
- Select Virus & threat protection.
- Under Ransomware protection, open Manage ransomware protection.
- Select Allow an app through Controlled folder access.
- Add the trusted app, then try the file again.
How to handle a real-time protection flag
When real-time protection flags a file, do not rush to turn it off. First check whether the file is still in Protection history or Current threats. If the warning disappears after a scan but returns later, treat that as a strong sign that the file is unsafe or incomplete.
- Open Windows Security.
- Select Virus & threat protection.
- Check Current threats and Protection history.
- Run Quick scan.
- If needed, run Custom scan on the file, or Microsoft Defender Antivirus offline scan if the issue keeps returning.
How to use Microsoft Defender offline scan
The offline scan is the next step when a threat is persistent or normal scans do not settle the issue. It starts after a restart and does not load Windows first, so malicious code has less chance to interfere. Use it when a file keeps reappearing, when the warning returns after startup, or when normal scanning cannot finish cleanly.
- Open Windows Security.
- Select Virus & threat protection.
- Open Scan options.
- Choose Microsoft Defender Antivirus offline scan.
- Save work and restart when prompted.
- After Windows loads again, check Protection history for the result.
Frequently asked questions
How to fix Windows Security these files can’t be opened
Start in Virus & threat protection, then check Protection history. If the item is quarantined, restore it only if trusted. If it is an allowed threat, reverse it with Don't allow. If the file is blocked by Controlled folder access, allow the app instead of disabling protection.
How do I open files blocked by Windows Security?
Use the specific reason first. Quarantined files are handled in Protection history. Protected-folder blocks are handled in Ransomware protection. If the file is still flagged after a scan, run a Custom scan on that file before opening it again.
Why can’t I open a file after Windows Security flagged it?
The file may still be in quarantine, may have been allowed once and then flagged again, or may be stopped by real-time protection during access. Check Current threats and Protection history first, because the fix depends on which action Windows Security took.
How do I allow a file in Windows Security without turning protection off?
For a quarantined item, open Protection history and restore it only if you trust the source. For a blocked app, go to Manage ransomware protection and use Allow an app through Controlled folder access. Do not switch off real-time protection unless a support path specifically requires it.
What is the difference between quarantined and allowed threats in Windows Security?
Quarantined items are isolated by Defender so they cannot run normally. Allowed threats are items Windows Security identified as threats but the user chose to let through. If needed, open Protection history and use Don't allow to reverse an allowed threat.
How do I run a custom scan in Windows Security?
Open Windows Security > Virus & threat protection > Scan options > Custom scan. Select the folder or file you want checked. This is the best option when only one download, project folder, or synced file needs inspection.