Enable or Disable the Network Adapter in One-Click for windows 10
Sometimes you may want to turn off your Internet connection in an instant, for instance if you have noticed that malware is running on a system to avoid it leaking information or data. A switch to turn off the Internet can be useful in other situations as well, like during software installations to block applications from phoning home, or cutting off all network traffic to have those resources available for other more important tasks on the system. Lastly, you could also use it to avoid distractions during work by turning of the connection.
While you could use a firewall for most of those tasks, depending on what you want to achieve, it may not be the easiest thing to configure.
Windows users can also create two batch files to turn the connection on or off. To do that, create a file on your desktop and name it on.bat, and another off.bat.
Right-click each file and select edit from the context menu. Now add the following two lines to each file (first on.bat, then off.bat).
@echo off
netsh interface set interface "Wireless Network Connection" disabled
@echo off
netsh interface set interface "Wireless Network Connection" enabled
Please note that this turns the wireless network connection on or off. If you do not use a wireless connection, replace "wireless network connection" with the name of the network adapter that you use to connect to the Internet.Control Panel\Network and Internet\Network Connections. You find the name of the adapter under network connections in the Control Panel.
so that you only need to click on one to turn the connection off and on again.
@echo off
netsh interface show interface | find "Connected" > nul
if errorlevel 1 goto #
netsh interface set interface "Wireless Network Connection" disabled
goto end
:#
netsh interface set interface "Wireless Network Connection" enabled
:end
Again, if you do not use a wireless connection, replace Wireless Network Connection with Local Area Connection.
This Code For Windows LAN Network connection Use This code
@echo off
title Network Connection Disabler
color b
netsh interface show interface | find "Connected" > nul
if errorlevel 1 goto #
netsh interface set interface Ethernet disabled
echo PLEASE WAIT NETWORK CONNECTION DISABLED ......
echo Programmer by Rishi
timeout /t 5
goto end
:#
netsh interface set interface Ethernet enabled
echo PLEASE WAIT NETWORK CONNECTION ENABLED ......
echo Programmer by Rishi
timeout /t 5
:end
Copy and paste this Code in Notepad and Save it as " Network Connection Disabler.bat "
Right-click and Run as Administrator..... and Enjoy this code.
Comments
Post a Comment