Shortcut to enable/disable network (wired) Solved


  1. Posts : 7
    Windows 10 Pro x64
       16 Mar 2016 #1

    Shortcut to enable/disable network (wired)


    Sorry if I missed it but it seems there is none posted under Shortcuts nor Internet & Network. I've tried searching for a solution but found no proper for Win10.
    There was at least one working in Win7 but it seems to have changed in Win10.
    I'm not looking for Wireless or Airplane just simple wired Ethernet LAN.

    Thanks in advance
    ifive


    Solved by T0mmy1977


    1. Create a batch file to execute the command below:
    2. netsh interface set interface name="Local Area Connection" admin=disabled
    3. Subsitute the actual network connection name if it isn't "Local Area Connection".
    4. Copy the batch file and change "disabled" to "enabled" for reactivation.
    5. Use "Create shortcut" on both, right-click and set "Shortcut" > "Advanced..." > "Run as administrator".
    6. Proper icons can be changed using "%SystemRoot%\system32\imageres.dll" in "Shortcut" > "Change Icon...".
    7. If you prefer white use "%SystemRoot%\system32\pnidui.dll" instead.
    Last edited by ifive; 17 Mar 2016 at 07:28. Reason: Solution
      My ComputerSystem Spec

  2. Berton's Avatar
    Posts : 5,679
    Win10 Home and Pro, Win10 Insider Preview, WinXP Home Premium, Linux Mint
       16 Mar 2016 #2

    ifive said: View Post
    Sorry if I missed it but it seems there is none posted under Shortcuts nor Internet & Network. I've tried searching for a solution but found no proper for Win10.
    There was at least one working in Win7 but it seems to have changed in Win10.
    I'm not looking for Wireless or Airplane just simple wired Ethernet LAN.

    Thanks in advance
    ifive
    The few times I've needed to do I right-clicked the Start button, clicked Device Manager, clicked the + on Network adapters and then right-clicked the adapter to Disable or Uninstall depending upon which I needed.
      My ComputerSystem Spec

  3.    16 Mar 2016 #3

    ifive said: View Post
    Sorry if I missed it but it seems there is none posted under Shortcuts nor Internet & Network. I've tried searching for a solution but found no proper for Win10.
    There was at least one working in Win7 but it seems to have changed in Win10.
    I'm not looking for Wireless or Airplane just simple wired Ethernet LAN.

    Thanks in advance
    ifive
    Navigate to your Network Connections page in Control Panel, right click on your adapter and create a short cut...

    Click image for larger version. 

Name:	000163.png 
Views:	51 
Size:	15.0 KB 
ID:	69762

    paste that shortcut into a custom Quick Launch folder...

    Click image for larger version. 

Name:	000164.png 
Views:	51 
Size:	18.0 KB 
ID:	69763

    which will give you a small icon on your taskbar...

    Click image for larger version. 

Name:	000165.png 
Views:	51 
Size:	12.2 KB 
ID:	69764
      My ComputersSystem Spec


  4. Posts : 7
    Windows 10 Pro x64
    Thread Starter
       16 Mar 2016 #4

    Thanks for fast replies.

    I know the long way, that's why I've started with "Shortcut ...".

    I've also tried the "Create Shortcut"-Version before by my own.
    First usage disables as expected.
    Second usage enables as expected.
    Don't ask me why any further usage during the same session tries to enable an enabled connection again and again instead of disabling it. Note that right click also offers only "Activate". And I've tried it just right now again, just in case I did something wrong by my own in the first place.
    That's the reason I'm asking for a real Shortcut - one click to disable/enable a wired Ethernet LAN, don't matter whether one or two shortcuts are necessary to fulfill the job.
      My ComputerSystem Spec

  5. TairikuOkami's Avatar
    Posts : 3,508
    Home 1809 x64 10.0.17763.194
       16 Mar 2016 #5

    You could try NetSetMan then.
      My ComputerSystem Spec


  6. Posts : 7
    Windows 10 Pro x64
    Thread Starter
       16 Mar 2016 #6

    Thanks, I know there are some applications that can handle your connections. But that's another app that has to be running in the first place...
    As I've written, it was possible in Win7 and as far as I've read also in Win8(.1). I'm curious to know a solution in Win10.
      My ComputerSystem Spec

  7.    17 Mar 2016 #7

    I found the below Googling. You can create a batch file to execute the command below.

    netsh interface set interface name="Local Area Connection" admin=disabled
    Subsitute the actual network connection name if it isn't Local Area Connection.
    Last edited by T0mmy1977; 13 Mar 2017 at 16:55.
      My ComputerSystem Spec


  8. Posts : 7
    Windows 10 Pro x64
    Thread Starter
       17 Mar 2016 #8

    Thanks. I've found it before, too. For some curious reason I did something wrong.

    To finish the task:
    Copy the batch file and change "disabled" to "enabled" for reactivation.
    Use "Create shortcut" on both, right-click and set "Shortcut" > "Advanced..." > "Run as administrator".
    Proper icons can be changed using "%SystemRoot%\system32\imageres.dll" in "Shortcut" > "Change Icon...". If you prefer white use "%SystemRoot%\system32\pnidui.dll" instead.
      My ComputerSystem Spec

  9.    23 Jun 2018 #9

    Actually the network connections shortcut works if you want to disable the connection. But what if you want to enable it back? Don't know about you but I want to be able to enable it back...
    Oh, and you probably want to consider cutting off the traffic rather than disabling the connection - it takes way less time getting it back up.
      My ComputerSystem Spec

  10. TairikuOkami's Avatar
    Posts : 3,508
    Home 1809 x64 10.0.17763.194
       23 Jun 2018 #10

    Run this command to find out your network adapter's index number:
    Code:
    wmic nicconfig get caption,index
    Then create bat shortcut with this one to disable it:
    Code:
    wmic path win32_networkadapter where index=1 call disable
    And this to enable it:
    Code:
    wmic path win32_networkadapter where index=1 call enable
    P.S. In order to avoid UAC, create an elevated shortcut.

    Create Elevated Shortcut without UAC prompt in Windows 10 | Windows 10 Tutorials
    Attached Thumbnails Attached Thumbnails capture_06232018_154131.jpg  
      My ComputerSystem Spec


 

Related Threads
Which Network Protocols should I enable or disable for my PC? My PC usage and router set up: - file downloading while also browsing web or streaming video - I don't do any lan/network sharing - Torrent file sharing - QOS is disabled on my...
Hi there This USB Wifi adapter seems to be a MEGA performer --Lovely finally to be able to THINK of getting rid of LAN cables all over the place. I've no probs with decent HD Movie streaming from a SERVER with one of these (I unplugged the LAN...
Wired Network in Network and Sharing
Hi SOrry if this has been asked before but I want to delete my Network and start a fresh. Can't for the life of me find how to do this. Any help or tips?
Hi, I'm new here and am posting this in the hope it may help others. I had what seems to be a common issue after upgrading from Win 7 to Win 10, where the PC (desktop) could not see the network/router. I do not have any VPN client installed and...
both my wired and wireless network connections fail after and upgrade to 10162. both worked fine at build 10158, in fact i can revert to previous build and they work again. The errors say all the network adapters have a problem with the drivers. ...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 20:52.
Find Us