Normally, I would use FireWall to Block An Application from Accessing the Internet. But I don't want to setup my FireWall system for just an application.
What I want is: create an bat file to start an application. The bat file similar to this.
If I run the bat file, the application is blocked from accessing internet. If I run the application directly, the application can access internet.
Is it possible to do that?
Best Answer
You could add firewall rule to block any incoming and outgoing traffic before running the application and disable (or delete) the firewall rules after exiting.
Setup block rules
Run the app with internet blocked
Details
netsh advfirewall firewall add rule -?