@echo off
setlocal


if exist "C:\Program Files\Reg Organizer" (
    for /R "C:\Program Files\Reg Organizer" %%X in (*.exe) do (
        echo Blocking: %%~nX
        netsh advfirewall firewall add rule name="%%~nX Reg Organizer - block" dir=out program="%%X" action=block
        netsh advfirewall firewall add rule name="%%~nX Reg Organizer - block" dir=in program="%%X" action=block
    )
)

if exist "C:\Program Files\VS Revo Group\Revo Uninstaller Pro" (
    for /R "C:\Program Files\VS Revo Group\Revo Uninstaller Pro" %%X in (*.exe) do (
        echo Blocking: %%~nX
        netsh advfirewall firewall add rule name="%%~nX Revo Uninstaller Pro - block" dir=out program="%%X" action=block
        netsh advfirewall firewall add rule name="%%~nX Revo Uninstaller Pro - block" dir=in program="%%X" action=block
    )
)

if exist "C:\Program Files\Sublime Text" (
    for /R "C:\Program Files\Sublime Text" %%X in (*.exe) do (
        echo Blocking: %%~nX
        netsh advfirewall firewall add rule name="%%~nX Sublime Text - block" dir=out program="%%X" action=block
        netsh advfirewall firewall add rule name="%%~nX Sublime Text - block" dir=in program="%%X" action=block
    )
)

if exist "C:\Program Files\ImageGlass" (
    for /R "C:\Program Files\ImageGlass" %%X in (*.exe) do (
        echo Blocking: %%~nX
        netsh advfirewall firewall add rule name="%%~nX ImageGlass - block" dir=out program="%%X" action=block
        netsh advfirewall firewall add rule name="%%~nX ImageGlass - block" dir=in program="%%X" action=block
    )
)

if exist "C:\Program Files (x86)\Evernote\Skitch" (
    for /R "C:\Program Files (x86)\Evernote\Skitch" %%X in (*.exe) do (
        echo Blocking: %%~nX
        netsh advfirewall firewall add rule name="%%~nX Skitch - block" dir=out program="%%X" action=block
        netsh advfirewall firewall add rule name="%%~nX Skitch - block" dir=in program="%%X" action=block
    )
)
if exist "C:\Program Files\PowerISO" (
    for /R "C:\Program Files\PowerISO" %%X in (*.exe) do (
        echo Blocking: %%~nX
        netsh advfirewall firewall add rule name="%%~nX PowerISO - block" dir=out program="%%X" action=block
        netsh advfirewall firewall add rule name="%%~nX PowerISO - block" dir=in program="%%X" action=block
    )
)

endlocal
pause
