I want to make a hotkey which I could use to disable a specific network adapter. Is that possible? If so, how would I configure that?
-
Do you just need the hotkey :-) or the method by which you can disable a network adapter. superuser.com/a/341835/98855 I use "devcon" to disable devices , then put batches with shortcuts. It has never failed. It is not easy to ID the device at first, but it would be easy to give it a global hotkey.– PsycogeekDec 24, 2014 at 1:12
1 Answer
Create a shortcut to cmd.exe on the desktop and append a specific netsh command to disable the adapter. Assign a hotkey and you're done
Create a shortcut on the desktop and paste
cmd /c netsh interface set interface name="interfacename" admin=disabled
Replace interfacename with your own adapter name e.g Local Area Network
Open the shortcut properties and enable Run as administrator under advanced. Due to this you will get an UAC prompt everytime. Unfortunately that's necessary or else we get:
An interface with this name is not registered with the router.
Also in the properties, assign a shortcut key. Remember, these hotkeys only work for shortcuts which are placed on the desktop as Microsoft states