CyberSolutions: Block An Application Access to Internet From The Context Menu

Friday, June 26, 2015

Block An Application Access to Internet From The Context Menu

We have already shown you various ways of restricting internet access in your computer through the Windows Firewall but these methods usually involve a lot of tampering and most users cannot be bothered. If you have a few programs that you regularly have to block and unblock from accessing the Internet then a context menu entry just for that should work wonders. I am going to show you how you can add an entry to the normal right click menu or to the extended one (Shift + Right click) if you prefer your standard one to be uncluttered.
Note before we begin
Because of the fact that you will need to change quite a few things in the Registry if you do this manually, it is much better if you create a .reg file and let everything install itself. To create such a file, create a new Text Document, copy and paste the things I will list below and then save the file as .reg instead of .txt. If you cannot see the extension, open the file, click on Save, select All Files and change the extension over there.
Adding the entries into the default context menu

Create a text file as I told you above and paste in everything below. Run your newly created .reg file and restart your computer to force the changes.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\exefile\shell\Add To Firewall]
[HKEY_CLASSES_ROOT\exefile\shell\Add To Firewall\command]
@=”netsh advfirewall firewall add rule name=\”%1\” dir=out action=block program=\”%1\””
[HKEY_CLASSES_ROOT\exefile\shell\Delete From Firewall
[HKEY_CLASSES_ROOT\exefile\shell\Delete From Firewall\command]
@=”netsh advfirewall firewall delete rule name=\”%1\””
Adding the entries into the extended context menu
Copy and paste in the following into your text document, run the .reg file and restart your computer:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTexefileshellAdd To Firewall]
[HKEY_CLASSES_ROOTexefileshellAdd To Firewallcommand]
@=”netsh advfirewall firewall add rule name=”%1″ dir=out action=block program=”%1″”
[HKEY_CLASSES_ROOTexefileshellDelete From Firewall]
[HKEY_CLASSES_ROOTexefileshellDelete From Firewallcommand]
@=”netsh advfirewall firewall delete rule name=”%1″”
How To Use?
To illustrate, we are going to add the Internet Explorer to the Firewall and prevent it from accessing the Internet.
1. Use the Find utility in the Start menu, type “Internet Explorer”.

If you go to the Firewall settings, you will see that Internet Explorer has been added to the Outbound Rules.

Selecting the “Delete From Firewall” will remove the app from the list.
In case you don’t want this feature, download the file UninstallFirewall.reg
The text of this file is:
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\exefile\shell\Add To Firewall]
[-HKEY_CLASSES_ROOT\exefile\shell\Delete From Firewall]
First, unblock all the applications that you have previously blocked.
Secondly, double click the uninstall file. When prompted, press OK. The Firewall options will disappear from the context menu.

Note: Always remember to restore the User Account Control to the default settings.

No comments :

Post a Comment