Created
January 23, 2021 18:19
-
-
Save fellypsantos/1215bd67d397f75219a5ade9397a2a5e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal enabledelayedexpansion | |
set folder[0]=C:\Program Files\Corel\CorelDRAW Graphics Suite 2019\Setup\MSIs\VSTA | |
set folder[1]=C:\Program Files\Corel\PASMUtility\v1 | |
set folder[2]=C:\Program Files\Corel\CorelDRAW Graphics Suite 2019\Setup | |
set folder[3]=C:\Program Files\Corel\CorelDRAW Graphics Suite 2019\Programs64 | |
set folder[4]=C:\Program Files\Corel\CorelDRAW Graphics Suite 2019\Filters64 | |
set folder[5]=C:\Program Files\Corel\CorelDRAW Graphics Suite 2019\Connect64 | |
for /l %%n in (0,1,5) do ( | |
echo Processing folder: !folder[%%n]! | |
@Rem Firewall block all executables inside the current folder | |
for %%G in ("!folder[%%n]!\*.exe") do ( | |
netsh advfirewall firewall add rule name="Blocked With Batchfile %%G" dir=in action=block program="%%G" enable=yes profile=any | |
netsh advfirewall firewall add rule name="Blocked With Batchfile %%G" dir=out action=block program="%%G" enable=yes profile=any | |
) | |
) | |
echo Done. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment