| @echo off |
| setlocal |
| set "DEVTOOLS_ROOT=%~dp0" |
| title TRUST ^& UNBLOCK TOOLS |
|
|
| echo =================================================== |
| echo WINDOWS SECURITY TRUST CONFIGURATOR |
| echo =================================================== |
| echo [INFO] This will unblock all downloaded files and |
| echo add this folder to Windows Defender exclusions. |
| echo. |
|
|
| :: 1. Unblock all files (Removes "Mark of the Web") |
| echo [1/2] Unblocking all files in %DEVTOOLS_ROOT%... |
| powershell -NoProfile -Command "Get-ChildItem -Path '%DEVTOOLS_ROOT%' -Recurse | Unblock-File" |
| echo [SUCCESS] All files have been unblocked! |
|
|
| echo. |
|
|
| :: 2. Add to Windows Defender Exclusion (Requires Admin) |
| echo [2/2] Attempting to add folder to Windows Defender Exclusions... |
| echo [NOTE] If a blue popup appears, click 'Yes'. |
| powershell -NoProfile -Command "Start-Process powershell -ArgumentList '-NoProfile -Command \"Add-MpPreference -ExclusionPath ''%DEVTOOLS_ROOT%''\"' -Verb RunAs" |
|
|
| echo. |
| echo =================================================== |
| echo [DONE] Windows will no longer block these tools! |
| echo [INFO] You can now use WELCOME.bat safely. |
| echo =================================================== |
| pause |
| endlocal |
|
|