I want to block a portable app to internet connection. I don't want to use third party apps (firewalls) to do that. I am trying to do with core Windows functions.
I find from command line the way to list all files which have "exe", "dll", "bin" extension under E:/apps/blockedapp directory.
I will block all these all files from command line by:
netsh advfirewall firewall add rule action=block program="dir/filename" name="myapp_filename_out" dir=out
netsh advfirewall firewall add rule action=block program="dir/filename" name="myapp_filename_in" dir=in
My first question is: After these commands, this app can use my internet connection?
I blocked these exe, bin, dll files because they can be executed by starting another process. This (another) process can use the internet connection. --> I test this with foxit reader portable. There is another process which is using to update Foxit Reader. I block this process too by processing these commands.
But I can not be sure if I should block all files (txt, jpg, dat ... even files without extension) or it is enough to block dll, exe, and bin files?