'Error with Netsh while enabling Windows Firewall

I want to enable my software to connect to any database (any remote port). If I execute this command, I get back 'Command not found'. What is wrong?

netsh advfirewall add rule name="MYRULE-OUT" dir=out action=allow program="C:\Program Files\MySoftware.exe" enable=yes

I want to execute this from an installer build with Install4j. Should the installer run as an administrator?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source