Skip to content

Instantly share code, notes, and snippets.

@Mosdatlan-falusi
Mosdatlan-falusi / block.bat
Created May 8, 2021 08:29
Creates a firewall rule for all .exe files in it s folder and in all folders below.
@echo off
@ setlocal enableextensions
@ cd /d "%~dp0"
echo.
echo This script file has to be copied to a folder that
echo contains the files you want to block on Windows Firewall.
echo It will block all .exe files in that folder and subfolders.
echo.
echo RUN IT AS ADMINISTATOR