Thanks to the answer by Kevin Richardson on How to open ports on Windows firewall through batch file, I wrote this batch file that uses the add command of the Netsh AdvFirewall Firewall Commands which requires Admin privileges to run: :: open port (first argument passed to batch script, second argument is description) :checkPrivileges net file 1>nul 2>nul if '%errorlevel%' == ...
↧