if "%4"=="" GOTO NUR3 netsh firewall add portopening protocol = %1 port = %2 name = %3 scope = %4 ENABLE GOTO ENDE :NUR3 netsh firewall add portopening protocol = %1 port = %2 name = %3 scope = ALL ENABLE :ENDE ECHO