File size: 1,192 Bytes
5516af1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | @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
|