@echo off
title Block in Firewall _ Soft98.iR
set name=wisecare365
set script_path=%~dp0app\wisecare365
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"

if "%errorlevel%" NEQ "0" (
    echo This script must be run as administrator. 
	echo Press any key to exit...
    pause >nul
    exit /b
)
netsh advfirewall firewall add rule name="%name%" dir=out action=block program="%script_path%\%name%.exe" enable=yes

echo Successfully "%name%.exe" has been add to windows firewall. 
echo.
echo ~~~~~~~~~~~~~~~~~~~~~~ Soft98.iR ~~~~~~~~~~~~~~~~~~~~~~
echo.
echo Press any key to exit...
pause >nul
