The Windows firewall in Windows Vista and newer versions of Windows cannot be disabled or enabled quickly. A user who wants to enable or disable it would have to open the Control Panel and load the Windows Firewall in the Security tab.
The option to Turn the Windows Firewall on or off appears in the menu. That's not a practicable option if you have to turn it off and on several times a day, maybe every time you switch locations.
Hank (thanks a lot) submitted a tip via email that explains how to enable or disable the Windows Vista Firewall with a simple shortcut, or better two shortcuts. He is using the approach to disable the firewall at home where a hardware firewall is protecting the PC and to enable it when he is using his laptop on the road, for instance at work.
To create the shortcuts right-click the desktop in Windows Vista and select to create a new shortcut from the context menu that opens up. Name the first shortcut Firewall OFF and the second Firewall ON. Use the following two commands to enable or disable the firewall.
Windows Firewall OFF:
%systemroot%\System32\netsh.exe firewall set opmode disable
Windows Firewall ON:
%systemroot%\System32\netsh.exe firewall set opmode enable
A click on Firewall OFF turns the Windows Vista Firewall off immediately and a click on Firewall ON enables it again. To get rid of the command line window in the background right-click the shortcut and select to run the command minimized like in the screenshot above. The default setting is normal window.
Please note that you may need to run the shortcut with elevated privileges. You can do this one-time by right-clicking on the shortcut and selecting the run as administrator option from the context menu.
If you use the shortcut regularly, you may find an automated inclusion of that option helpful. Right-click the shortcut and select properties from the context menu.
Switch to the shortcut tab if not selected already and click on the advanced button. Check the run as administrator box here and click ok. This configures the shortcut to always run with elevated privileges.
The shortcuts use generic icons which you can change as well if you want. To do so click on change icon on the Shortcut tab and select one of the default icons for it or browse to another location on your system to pick an icon from.
One file with lots of icons is %SystemRoot%\system32\imageres.dll. Here you can pick appropriate icons, for instance the red and green shield icons to visualize the off and on functionality.Advertisement
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.