New
#21
Thanks for help, but it contradicts with Brink's post "If the app is checked in the allowed list, then it's not blocked. It should be unchecked."
Add or Remove Allowed Apps through Windows Firewall in Windows 10
.bat file should block both inbound and outbound connections. With allowed list
not sure if all in/out connections are blocked. Somehow this is confusing.
- - - Updated - - -
One more question regarding addfwrs.bat from post #10
I would like all .exe files to be completely blocked from 2 folders:
%ProgramFiles(x86)%\1234
%ProgramFiles%\1234
Folder 1234 could be in any location or maybe even in both. So made this way and it works for %ProgramFiles(x86)%
Code:@CD /d "%ProgramFiles(x86)%\1234" for %%* in (.) do set RULENAME=%%~nx* ECHO. FOR /r %%G in ("*.exe") Do (@echo %%G NETSH advfirewall firewall add rule name="%RULENAME%-%%~nxG" dir=in program="%%G" action="block" enable="yes") FOR /r %%G in ("*.exe") Do (@echo %%G NETSH advfirewall firewall add rule name="%RULENAME%-%%~nxG" dir=out program="%%G" action="block" enable="yes") ECHO.
So how to add %ProgramFiles%\1234 folder?
To make sure the application is totally blocked, you must block all files in both inbound and outbound communication. Especially the outbound one (that checks for updates and for valid key).