21 September, 2010

Add internet on/off switch to right click context menu

Copy following code to notepad and save it like somename.reg (registry key file). And after that you need to write this file in windows registry with double click on it.

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\Net OFF]

[HKEY_CLASSES_ROOT\Directory\Background\shell\Net OFF\command]
@="netsh interface set interface \"Local Area Connection\" disabled"

[HKEY_CLASSES_ROOT\Directory\Background\shell\Net ON]

[HKEY_CLASSES_ROOT\Directory\Background\shell\Net ON\command]
@="netsh interface set interface \"Local Area Connection\" enabled"
Or just download this already written registry key file and write it into your windows registry.

Default name of the network adapter in Windows is Local Area Connection. If your network adapter is named with different name you need to replace that name in the code instead default name before you write the registry file into Windows registry. To see the name of your network adapter you need to execute Run (Windows key + R) and insert "ncpa.cpl" without quotes.


0 comments:

Post a Comment