Creating a .reg file for adding exclusions to Windows Defender can be done with a text editor like Notepad++, but please be cautious when editing the Windows Registry as it can affect system stability and security.
Here’s how to create the .reg file using Notepad++:
-
Open Notepad++.
-
Enter the Windows Registry Editor version at the top of the file. It should be the first line:
Windows Registry Editor Version 5.00
-
Then, you need to specify the path to the registry key where you'll be adding the exclusions. Each exclusion will be a new string value within this key. On the next line, enter:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Exclusions\Processes]
-
Now, for each filename, you will need to create a line in the following format, replacing FileName.exe with the actual filename:
"FileName.exe"=dword:00000000
dword:00000000 is a placeholder that tells the system this is an excluded process.
-
If you have your list of 660 filenames in the Notepad++ file, each on a new line, you can use the Find and Replace functionality to quickly format them correctly.
Go to the ‘Search’ menu and choose 'Replace...' or press Ctrl + H.
- Find what:
^(.*)$
- Replace with:
"\1"=dword:00000000
- Search Mode: Select ‘Regular expression’ and make sure
. matches newline is NOT checked.
After setting up the Find and Replace dialog, click on ‘Replace All’.
Your file should now look like this:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Exclusions\Processes]
"FirstFile.exe"=dword:00000000
"SecondFile.exe"=dword:00000000
...
"LastFile.exe"=dword:00000000
- Once you've prepared your file, save it with the
.reg extension by clicking on ‘File -> Save As’ and set the 'Save as type' to 'All Types (.)'. Give it a name like defender_exclusions.reg and click ‘Save’.
Before running the .reg file, it's important that you review it carefully to ensure no mistakes have been made. Applying a .reg file with incorrect data can cause system issues.
To apply the .reg file, simply double-click it and confirm that you want to make the changes to your registry. It’s wise to backup your registry beforehand, in case something goes wrong.
Lastly, due to system or policy restrictions, certain environments may prevent or limit modifications to Windows Defender exclusions and other security settings. Always make sure you follow your organization's policies and best practices when managing security configurations.