ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

Idea: hotkey to disable/enable nic

(1/3) > >>

techidave:
Been searching for something that will let me disable or enable the nic on either vista or xp.  I could press a couple of keys like ctrl+shift+n and then it would to check the current status of the nic and then perform the appropriate action to turn it off or on.

I know I could just right click the 2 little monitors and choose disable or enable but that isn't what I want.  It would be nice if it could only be run under administrative user.

Most of the programs I have found have been for wireless nics but I need one for a desktop connected via a cable.

electronixtar:
if using Vista try

--- ---netsh interface set interface <interface name> DISABLED
For example to disable an interface with its default name “Local Area Connection,” run:
netsh interface set interface “Local Area Connection” DISABLED
To enable the interface, you'd then run:
netsh interface set interface “Local Area Connection” ENABLED

techidave:
thanks est for a vista solution.  now we can find an xp solution.

40hz:
If you're using TCP/IP as your only network protocol, a quick & dirty way do it in XP would be to have the NIC drop it's IP address assuming you're using DHCP to get your IP address from your router.

This doesn't disable the NIC per sce. But it does render it unable to access the network, so it effectively kills any chance of connecting to it.



To "disable" use: ipconfig /release [adapter]

example: ipconfig /release "Local Area Connection"

To "enable" use: ipconfig /renew [adapter]

If you only have one NIC the adapter name is optional.

For hotkeying, you could write each command string to a separate batch file (e.g. killNIC.bat and wakeNIC.bat) and invoke them with whatever hotkey mapping utility you'd prefer. There are dozens of free ones available for download. You could also map them to an unused function key if your keyboard comes with keymap utility software.

 :Thmbsup:

techidave:
the free ones i found seemed to be more for wireless nics.  I didn't check them out further to see if they would work on the others.

Navigation

[0] Message Index

[#] Next page

Go to full version