set myname="cmd_canby.exe"
netsh advfirewall firewall delete rule name="canby.exe"
netsh advfirewall firewall delete rule name=%myname%
netsh advfirewall firewall add rule name=%myname% dir=in program= "%~dp0CANby.exe" action=allow
netsh advfirewall firewall set rule name=%myname% new enable=yes
pause