Windows 10: How to block multiple EXE files Windows Firewall

Discus and support How to block multiple EXE files Windows Firewall in Windows 10 Network and Sharing to solve the problem; Hello! I want to block a certain application from any access to the internet, either inbound or outbound, so it will never attempt to upgrade. I... Discussion in 'Windows 10 Network and Sharing' started by spapakons, Mar 5, 2016.

  1. spapakons Win User

    How to block multiple EXE files Windows Firewall


    Hello!

    I want to block a certain application from any access to the internet, either inbound or outbound, so it will never attempt to upgrade. I went in the Advanced Settings in Windows Firewall but I can only block one-by-one the executable files (EXE) and this application has at least 30. Is there any way to block all EXE files in a specific folder at once?

    Thank you in advance.

    PS: This was asked in sevenforums.com by another poster and all replies were about blocking other users to share the folder. WRONG! I want to block all executables from accessing or receiving data from the internet, which is a totally different thing. So please reply only if you have something useful to say and keep it on topic. Thanks.

    :)
     
    spapakons, Mar 5, 2016
    #1
  2. Yolvi Ell Win User

    Why is Camtasia 9 still able to access the internet even when I blocked it through the Windows Firewall with Advanced Security?

    We appreciate the information you provided. It's possible that your program file path is causing the issue. Third-party programs sometimes have multiple EXE files and the main EXE file may not be the actual EXE file that you have to block. To make sure that
    you're blocking the correct EXE file, we suggest using Resource Monitor by following these steps:

    • Click Start.
    • Type Resource Monitor.
    • Click the Network tab.
    • Look for the EXE file for your program, assuming that it's currently accessing the Internet. If the EXE has a different file name than what you expected, use that file name instead when you specify the program path in Windows Firewall.

    If you're already using the correct program path, we highly recommend posting your concern in our

    TechNet Forums
    . Our IT specialists will be able to provide more technical assistance with establishing the proper firewall settings that you need to block the program.

    Let us know if you have any other concerns with your computer.
     
    Yolvi Ell, Mar 5, 2016
    #2
  3. biz74 Win User
    Firewall (AVG firewall)l blocks modern (not desktop) app TouchVPN, how to make an exception in the firewall settings for the apps from windows store?

    App is installed, firewall blocks internet access for this app.

    It is easy to add desktop apps to exception list in firewall settings, but how can I do this with modern apps

    from store (have no access to exe files and even folders)

    If I change AVG firewall to Windows firewall how can I allow modern apps internet access?
     
    biz74, Mar 5, 2016
    #3
  4. bro67 Win User

    How to block multiple EXE files Windows Firewall

    The problem is that without telling anyone what programs you are looking at restricting, there is not much that can be done. You do not block the programs from connecting outside of the LAN. You are blocking the ports that they use. It has always been that way. Blocking folders has nothing to do with this, so really do not even know why you brought it up, along with mentioning the other forum and getting upset about something by capitalizing your anger at something that has nothing to do with what you want to do.

    Windows Firewall rules are something that you can cause other issues if you do not create them right. Technet at microsoft.com has all of the information that you need to create firewall rules for the built in firewall.
     
    bro67, Mar 5, 2016
    #4
  5. ARC1020 Win User
    Windows Firewall doesn't support wildcards, therefore I'm thinking using a batch file would probably be the quickest way. Batch files aren't really my forte, however as an example maybe something along these lines.

    1) Paste ALL the following into NotePad (including the last line that's hidden from view) and obviously edit to show the folder path where the applications that you want to block are.

    Code: for %%G in ("C:\Program Files (x86)\Test Folder\*.exe") do ( netsh advfirewall firewall add rule name="Blocked With Batchfile %%G" dir=in action=block program="%%G" enable=yes profile=any netsh advfirewall firewall add rule name="Blocked With Batchfile %%G" dir=out action=block program="%%G" enable=yes profile=any )[/quote]
    2) Save the text file and rename it to BlockInOut.bat

    3) Right-click BlockInOut.bat and run as administrator.


    How to block multiple EXE files Windows Firewall [​IMG]



    4) Check your Inbound and Outbound firewall rules afterwards


    How to block multiple EXE files Windows Firewall [​IMG]



    Note: Before carrying out any of the above, I'd recommend that you open Windows Firewall With Advanced Settings in the advanced view. Right-Click and select 'Export Policy', then save it somewhere safe. This way in the event of any problems, you'll be able to import your policy again to reset it back to how it is currently.


    How to block multiple EXE files Windows Firewall [​IMG]



    Obviously be aware that Windows Firewall won't give you/the user any indication if or when it's blocking connections, unless you specifically set up Blocked Connection logging in Event Viewer.
     
    ARC1020, Mar 5, 2016
    #5
  6. topgundcp Win User
    topgundcp, Mar 5, 2016
    #6
  7. spapakons Win User
    2) Save the text file and rename it to BlockInOut.bat

    3) Right-click BlockInOut.bat and run as administrator.


    How to block multiple EXE files Windows Firewall [​IMG]



    4) Check your Inbound and Outbound firewall rules afterwards


    How to block multiple EXE files Windows Firewall [​IMG]



    Note: Before carrying out any of the above, I'd recommend that you open Windows Firewall With Advanced Settings in the advanced view. Right-Click and select 'Export Policy', then save it somewhere safe. This way in the event of any problems, you'll be able to import your policy again to reset it back to how it is currently.


    How to block multiple EXE files Windows Firewall [​IMG]



    Obviously be aware that Windows Firewall won't give you/the user any indication if or when it's blocking connections, unless you specifically set up Blocked Connection logging in Event Viewer.[/quote] Exactly the reply I was looking for! The script did the job in seconds! All I had to do was copy-paste the folder path from Windows explorer and modify the script. Million Thanks!

    Another guy mentioned blocking the ports. This is not the case, since the same ports could be used by another application and I don't know which ports I should block.

    Also it shouldn't cause any damage to block a specific application from accessing the internet, unless the application works by accessing the internet and other applications depend on it. So it is irrelevant which was the application I wanted to block. The script is the same, just use the proper path. Thanks again!

    *Thumbs
     
    spapakons, Mar 5, 2016
    #7
  8. spapakons Win User

    How to block multiple EXE files Windows Firewall

    I downloaded Windows Firewall Control, but haven't tried yet since the script by ARC1020 did the job. Thank you any way! I added that in my Utilities collection. *Biggrin
     
    spapakons, Mar 5, 2016
    #8
  9. topgundcp Win User
    Glad it works out for you. However, Try WFC, you might find it useful as it does what the script does and a lot more.
    In some case, blocking the .exe is not enough, you also need to block the .dll also.
     
    topgundcp, Mar 5, 2016
    #9
  10. Old thread, but I gotta add -- the above is just plain incorrect. Windows firewall does indeed have the capability of blocking an application from accessing the internet regardless of the ports it use. It's always been that way.
     
    DudeInMyrtleBch, Dec 9, 2016
    #10
  11. spapakons Win User
    Yes doesn't matters which port the application tries to use, you can block it for any port and any protocol (UDP or TCP) to make sure. If you don't know which of many EXE the application launches to connect to the internet, you just block the whole folder (see earlier posts in this thread) so there is no way it can access the internet without you explicitly giving permission. This is to avoid auto updates that can screw the application and cannot be turned off by the user. You cannot turn it off, so you block it and you have a peace of mind. However be careful not to block an application that relies on internet access to work or you effectively disable it.
     
    spapakons, Dec 9, 2016
    #11
  12. jpeni Win User
    jpeni, Feb 27, 2017
    #12
  13. How to block multiple EXE files Windows Firewall

    Problem is: when you run this batch file as Admin

    it asks whether you want to block Windows/System32 and all its subfolders---NOT EXACTLY WHAT MOST EVERYONE WOULD DESIRE !
     
    Cabbagestack, Aug 19, 2017
    #13
  14. 2) Save the text file and rename it to BlockInOut.bat[/quote] .
    .
    .
    .
    .
    etc. etc.

    Tried all of that....didn't do anything...no rules were added.

    EDIT:
    OOOPPSS !! My bad....I didn't try refreshing the rules page ! IT DOES WORK THOUGH!! GREAT THANKS
     
    Cabbagestack, Aug 19, 2017
    #14
  15. It would help a lot of people if someone could add to that code so that the user specifies a folder and the batch file creates blocking inbound/outbound rules for every .exe and .dll including every subfolder. I just don’t know how… I only speak Java and C++
    ...I don't know anything about the syntax for these batch files
     
    Cabbagestack, Aug 19, 2017
    #15
Thema:

How to block multiple EXE files Windows Firewall

Loading...
  1. How to block multiple EXE files Windows Firewall - Similar Threads - block multiple EXE

  2. Default blocking of .exe files?

    in Windows 10 Gaming
    Default blocking of .exe files?: Hi all, Today I downloaded a program and noticed that when I tried to open/run the .exe file, nothing would happen. After some digging, I found that when I opened the file's properties, in the "Attributes" it was set to blocked. I checked the "Unblock" box and when I opened...
  3. Default blocking of .exe files?

    in Windows 10 Software and Apps
    Default blocking of .exe files?: Hi all, Today I downloaded a program and noticed that when I tried to open/run the .exe file, nothing would happen. After some digging, I found that when I opened the file's properties, in the "Attributes" it was set to blocked. I checked the "Unblock" box and when I opened...
  4. how to block entire .exe files of a specified folder using .bat file Windows firewall?

    in Windows 10 Gaming
    how to block entire .exe files of a specified folder using .bat file Windows firewall?: How to Block entire .exe files of a specified folder in e.g. "C:\ProgramData\" or "C:\Program Files\" Windows Firewall using .bat?I want to run it from pen drive for specified folder in "C:\ProgramData\" or in "C:\Program Files\"Seems like this is exist but it need to be...
  5. how to block entire .exe files of a specified folder using .bat file Windows firewall?

    in Windows 10 Software and Apps
    how to block entire .exe files of a specified folder using .bat file Windows firewall?: How to Block entire .exe files of a specified folder in e.g. "C:\ProgramData\" or "C:\Program Files\" Windows Firewall using .bat?I want to run it from pen drive for specified folder in "C:\ProgramData\" or in "C:\Program Files\"Seems like this is exist but it need to be...
  6. how to block entire .exe files of a specified folder using .bat file Windows firewall?

    in Windows 10 Customization
    how to block entire .exe files of a specified folder using .bat file Windows firewall?: How to Block entire .exe files of a specified folder in e.g. "C:\ProgramData\" or "C:\Program Files\" Windows Firewall using .bat?I want to run it from pen drive for specified folder in "C:\ProgramData\" or in "C:\Program Files\"Seems like this is exist but it need to be...
  7. Blocked exe file

    in Windows 10 Software and Apps
    Blocked exe file: I am sure someone somewhere has a virtual voodoo doll of me. This is the exe file for a game I have had since 2007. It has never happened before. I have scanned the folder with Kaspersky. It says its clean. I have switched off UAC, then switched off the pc, and restarted it,...
  8. Windows cannot find multiple exe files?

    in Windows 10 Ask Insider
    Windows cannot find multiple exe files?: I woke up today and found that multiple of my programs could not find their exe file. As I did research I found out possibly malware or ransomware so I just reset and reinstalled windows 10 on my personal pc. A family members PC is now however doing the same! We did not share...
  9. Exe blocked.

    in AntiVirus, Firewalls and System Security
    Exe blocked.: Hello, I am operating on Microsoft office 2010 but would like to upgrade to Microsoft professional plus office 2013. Unfortunately whenever I try to install I get a message by Windows defender "Unauthorized changes are blocked". What can I do in order to be authorized?...
  10. How To Combine Multiple Files Into One EXE File

    in Windows 10 Support
    How To Combine Multiple Files Into One EXE File: Hello. I have one EXE file and multiple DLL files in that same folder that are required to run the EXE. I am not a programmer, yet does anyone know of a free program that can combine all these files together into 1 EXE file. Once I open the EXE file, everything will work...

Users found this page by searching for:

  1. block program in firewall windows 10 bat file

    ,
  2. Block all exe nets

    ,
  3. block múltiple programa firewall

    ,
  4. batch file windows firewall control