Add Controlled Folder Access Folders with Regedit
Controlled Folder Access in Windows Defender prevents unauthorized
applications and ransomware from modifying sensitive files in specified
directories. While this feature can be managed via the Windows Security
app or PowerShell, administrators can also configure it globally through
the Windows Registry. This guide explains how to add custom protected
directories to Controlled Folder Access using the Registry Editor
(regedit).
Prerequisites
Before modifying the registry, ensure you have administrative privileges. You should also ensure Controlled Folder Access is enabled on the target machine.
Step-by-Step Guide
- Open the Registry Editor
- Press
Win + Ron your keyboard to open the Run dialog box. - Type
regeditand pressEnter. - Click Yes if prompted by User Account Control (UAC).
- Press
- Navigate to the Exploit Guard Key
In the Registry Editor address bar, paste the following path and press
Enter:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Windows Defender Exploit Guard\Controlled Folder AccessNote: If the
Windows Defender Exploit GuardorControlled Folder Accesskeys do not exist, create them by right-clicking the parent key, selecting New > Key, and naming them accordingly.
- Create the ProtectedFolders Subkey
- Right-click the
Controlled Folder Accesskey. - Select New > Key.
- Name the new key
ProtectedFolders.
- Right-click the
- Add Your Protected Directory
- Select the newly created
ProtectedFolderskey. - Right-click in the empty space on the right pane and choose New > String Value (or DWORD (32-bit) Value).
- For the Value name, enter the exact, full file path
of the folder you want to protect (e.g.,
C:\MyConfidentialData). - Double-click the newly created value and set its Value
data to
0. - Click OK to save.
- Select the newly created
- Add Additional Folders (Optional)
- To add more directories, repeat Step 4 by creating a new entry for
each path with a value data of
0.
- To add more directories, repeat Step 4 by creating a new entry for
each path with a value data of
- Apply the Changes
- Close the Registry Editor.
- Restart your computer or restart the Windows Defender service to ensure the new protection paths take effect.