#1
(This post was last modified: 08 February, 2022 - 07:50 AM by Monteshonti. Edited 3 times in total.)
can somesone can write this code in c# and and make an exe.
Code:
@echo off
:: Variables
set RULE_NAME=SmartPLS
set PROGRAM=C:\Program Files\SmartPLS 3\SmartPLS.exe

netsh advfirewall firewall add rule name="%RULE_NAME%" dir=in action=block profile=any program="%PROGRAM%"
netsh advfirewall firewall add rule name="%RULE_NAME%" dir=out action=block profile=any program="%PROGRAM%"

SET NEWLINE=^& echo.

FIND /C /I "license.smartpls.com" %WINDIR%\system32\drivers\etc\hosts IF %ERRORLEVEL% NEQ 0 ECHO %NEWLINE%^127.0.0.1 license.smartpls.com>>%WINDIR%\system32\drivers\etc\hosts