How to Disable Windows Defender Real-Time Scanning for Game Folders
Reduce Defender-related stutter by excluding game folders from scans, and use Kudu to improve gaming responsiveness safely.
By the Kudu Team · Reviewed
Game Mode
Apply gaming tweaks you can undo
Kudu’s Game Mode applies supported Windows gaming tweaks and records how to restore them. It does not promise FPS gains; drivers and in-game settings still matter.
Download Kudu Free →How Game Mode worksWhat Causes This?
Microsoft Defender real-time protection scans files when apps open, change, or create them. Games often stream large asset files, build shader caches, unpack archives, update anti-cheat components, and write logs while you play. On slower storage, heavily modded installs, or systems already under high CPU or disk load, that extra scanning can add stutter, longer loading, or brief freezes.
Common Symptoms
- Games hitch when loading new areas, textures, or shaders
- Load times are worse after a patch or first launch
- CPU or disk usage spikes from
Antimalware Service Executable - Modded games freeze or pause during launch
- Slowdowns happen more often during installs, updates, or shader compilation
How to Fix It Manually
Instead of disabling Defender for the whole PC, add exclusions only for the game folders you trust.
-
Open Windows Security
- Press
Start, type Windows Security, then open it. - Select Virus & threat protection.
- Press
-
Open exclusion settings
- Under Virus & threat protection settings, select Manage settings.
- Scroll to Exclusions and choose Add or remove exclusions.
- If prompted by User Account Control, approve the change.
-
Add the game folder
- Select Add an exclusion > Folder.
- Browse to the game’s install folder and select it.
- Common locations include:
C:\Program Files (x86)\Steam\steamapps\common\C:\Program Files\Epic Games\C:\XboxGames\- A custom library such as
D:\Games\
-
Exclude the specific game, not the whole library if you can
- Prefer the exact game folder over the entire Steam, Epic, or Xbox library.
- Example: exclude
D:\Games\Elden Ringinstead ofD:\Games. - This keeps the rest of the library covered by real-time scanning.
-
Add other trusted folders only if the problem continues
- Some games also hit Defender scans in related folders, such as:
- A game-specific mods folder
- A launcher cache folder you recognize
- A game data folder under
C:\Users\YourName\Documents\My Games\
- Only exclude folders you know belong to the game or launcher.
- Do not exclude your whole user profile,
Program Files, or an entire drive.
- Some games also hit Defender scans in related folders, such as:
-
Test again and watch usage
- Close and reopen the game after adding the exclusion.
- Open Task Manager with
Ctrl + Shift + Escand check whether CPU or Disk usage fromAntimalware Service Executablestill spikes during launch or area loads. - If the spikes are smaller and the stutter is reduced, the exclusion likely helped.
-
Use full real-time protection disablement only as a short test
- In Windows Security > Virus & threat protection > Manage settings, you can temporarily switch off Real-time protection.
- Windows may turn it back on automatically, and leaving it off lowers protection for the whole PC.
- If you try this, use it only to confirm the cause, then turn it back on right away.
Fix It Automatically with Kudu
Kudu cannot change Microsoft Defender exclusions for you. What it can do is help you check whether background load is the real problem: use Performance Monitor to see CPU, memory, disk, and network activity in real time and identify whether Antimalware Service Executable, a launcher, or another process is causing the spikes. On Windows, Game Mode can also apply supported gaming tweaks and record how to restore them, without disabling security features.
Frequently asked questions
- Is it safe to exclude a game folder from Microsoft Defender?
- It is usually safer than turning off real-time protection for the whole PC, but it still reduces scanning for anything inside that folder. Only exclude games and launchers you trust, and avoid broad exclusions like an entire drive or user folder.
- Why does Defender keep turning real-time protection back on?
- That is normal on current Windows builds. Microsoft Defender is designed to restore real-time protection automatically after a short time or after a restart.
- Should I exclude my whole Steam or Epic library?
- Usually no. Excluding only the specific game that is stuttering gives you the same troubleshooting value with less security risk.
- Will this help on macOS, Ubuntu, or Fedora?
- No, these steps are specific to Microsoft Defender on Windows. If you use third-party antivirus on another OS, check that product’s exclusion settings instead.

Game Mode
Apply gaming tweaks you can undo
Kudu’s Game Mode applies supported Windows gaming tweaks and records how to restore them. It does not promise FPS gains; drivers and in-game settings still matter.
Download Kudu Free →How Game Mode worksRelated guides
How to Enable Windows Defender Real-Time Protection Properly
Learn how to turn on Defender real-time protection correctly and verify it stays active; Kudu can help spot security issues fast.
How to Fix Windows Defender Real-Time Protection Keeps Turning Off
If Defender real-time protection disables itself, this guide shows why it happens and how Kudu can help secure the PC again.
How to Disable Xbox Game Bar to Improve Gaming Performance
Turn off Xbox Game Bar if it causes lag, stutter, or resource usage during gameplay, and let Kudu help optimize Windows.
How to Enable Windows Game Mode for Better Gaming Performance
Turn on Windows Game Mode to reduce background interference and boost game responsiveness, with Kudu helping optimize the rest.