Page 1 of 1

Firewall exception

Posted: Wed Oct 06, 2021 2:00 pm
by AKP
Hello

How can I use the installer to add my application to the Windows Firewall exceptions?
I found the following, but how to do it with the installer?

Code: Select all

netsh advfirewall firewall add rule name="My Application" dir=in action=allow program="C:\MyApp\MyApp.exe" enable=yes

Re: Firewall exception

Posted: Thu Oct 07, 2021 2:40 am
by Leo
Try the following examples on the System / Commands page:

Code: Select all

File: 		powershell.exe
Parameters: 	netsh advfirewall firewall add rule name="My Application" dir=in action=allow program="C:\MyApp\MyApp.exe" enable=yes

Code: Select all

File: 		<SystemDir>\WindowsPowerShell\v1.0\powershell.exe
Parameters: 	netsh advfirewall firewall add rule name="My Application" dir=in action=allow program="C:\MyApp\MyApp.exe" enable=yes

Re: Firewall exception

Posted: Thu Oct 07, 2021 9:51 am
by AKP
Do you have to put the variables in quotation marks?

Code: Select all

netsh advfirewall firewall add rule name=<AppName> dir=in action=allow program=<MainExecutable> enable=yes

Re: Firewall exception

Posted: Sun Oct 10, 2021 4:07 am
by Leo
yes