Hello. Can you please show how you can add an application to the list of allowed Windows firewall programs using the standard Netsh.exe utility? Thank.


I watched this resource , but did not really understand how to use those commands. Or rather this one:

netsh firewall add allowedprogram C:\MyApp\MyApp.exe «Мое приложение» ВКЛЮЧИТЬ 
  • If at one point you find out that you are borrowing solutions from the PCP, this is a signal that something is very wrong :-) PS: INetFwMgr - karmadro4
  • Well, yes, at php `shnikov =) - AseN

1 answer 1

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

What was the problem?

  • Be careful! Only from a group with admin rights - stck
  • Thank you so much! Here is just one clarification - this code will work and the application will be allowed in the firewall if the user has logged in as an administrator? - AseN
  • Yes, but to use it flexibly check: [Technet] [1] [1]: technet.microsoft.com/ru-ru/library/cc732869(v=ws.10).aspx - stck
  • Great! Thanks a lot! This is exactly what you need. Respect) - AseN