@echo off

rem 安装说明：
echo %~d0
echo %~dp0
@echo off

%~d0
cd %~dp0

netsh advfirewall firewall add rule name="HuiHong_RemoteDesktop"        dir=in action=allow program="%~dp0RemoteDesktop.exe"
netsh advfirewall firewall add rule name="HuiHong_NetFlash"             dir=in action=allow program="%~dp0NetFlash.exe"
netsh advfirewall firewall add rule name="HuiHong_RemoteGetDataServer"  dir=in action=allow program="%~dp0RemoteGetDataServer.exe"
netsh advfirewall firewall add rule name="HuiHong_ScaleDataManage"      dir=in action=allow program="%~dp0ScaleDataManage.exe"
netsh advfirewall firewall add rule name="HuiHong_ScaleFinder"          dir=in action=allow program="%~dp0ScaleFinder.exe"
netsh advfirewall firewall add rule name="HuiHong_ScaleFlowServer"      dir=in action=allow program="%~dp0ScaleFlowServer.exe"

netsh advfirewall firewall add rule name="HuiHong_AllowUdpPortRangeA"   dir=in action=allow protocol=udp localport=5000-6000
netsh advfirewall firewall add rule name="HuiHong_AllowUdpPortRangeB"   dir=in action=allow protocol=udp localport=60001-60255
netsh advfirewall firewall add rule name="HuiHong_AllowTcpPortRangeC"   dir=out action=allow protocol=udp remoteport=3001-3010

netsh advfirewall firewall add rule name="HuiHong_All_ICMP_V4"   protocol=icmpv4:any,any dir=in action=allow