In Windows Firewall with Advanced Settings I can create a rule which blocks all inbound or outbound traffic for particular program by pointing to its .exe file. The problem is that this program has many .exe files in its directory, as well as additional ones in its sub directories. So many question is: do I need to make separate rules for each .exe file, which in this case would mean about 50 rules or is there a way to block the traffic for a group of .exe files based on their location on the local hard drive. Thank you.
*Configure and Add rules in windows firewall based on dynamic content (exe files) in that folder: *
you should work with PowerShell or command line tools that run everyday.
like this : Article Link
There are also some good VBScript samples on MSDN which I used as a starting point.
open ISA Server Management, click Start, point to All Programs, point to Microsoft ISA Server, and then click ISA Server Management.
Block responses containing Windows executable content visit this Article here
in our network that based on windows we have cache server named SQUID :
Squid content filtering: Block / download of music MP3, mpg, mpeg, exec files
Although @saber tabatabaee yazdi answer is much more thorough.
If the .exe's are located in the same folder you can probably add it in the windows firewall list.If they are located in different folders then you have to manually add those.In general,the firewall will ask for user's permission if an .exe tries to access the network i.e one that is not recognized as a trusted application.But it wont track what are the individual exe's that are called inturn by that process.You can either disable all ports or specific ports.
In general the windows firewall is not my recommendation unless you update your windows everyday.Use Comodo's free edition to have better control and it can be easily setup.