Skip to content

Instantly share code, notes, and snippets.

@skkut
Last active July 10, 2024 10:33
Show Gist options
  • Save skkut/11c68d47af09f2dca717bed5269eb517 to your computer and use it in GitHub Desktop.
Save skkut/11c68d47af09f2dca717bed5269eb517 to your computer and use it in GitHub Desktop.
A windows batch file to block all applications in a folder in Windows firewall
@ setlocal enableextensions
@ cd /d "%~dp0"
for /R %%a in (*.exe) do (
netsh advfirewall firewall add rule name="Blocked with Batchfile %%a" dir=out program="%%a" action=block
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment