[SOLVED] Broken turn off/on Ethernet connection via shortcut. Batch file/app needed

Discussion in 'Windows 8' started by anythingUlike, Dec 4, 2013.

  1. anythingUlike

    anythingUlike MDL Junior Member

    Apr 4, 2011
    79
    9
    0
    #1 anythingUlike, Dec 4, 2013
    Last edited: Dec 4, 2013
  2. user_hidden

    user_hidden MDL Expert

    Dec 18, 2007
    1,034
    1,061
    60
    #2 user_hidden, Dec 4, 2013
    Last edited by a moderator: Apr 20, 2017
    use something like this as a check:

    Code:
    ping -n 1 yahoo.com 
    if %errorlevel% EQU 1 goto enable 
     
  3. BigW

    BigW MDL Member

    Apr 25, 2010
    198
    53
    10
    May I ask why you have the need to regularly turn off/on your Ethernet connection? I've the need for it only a few times a year or when I've to install new networking equipment which isn't realy that often. Even if you have to do this once or twice a month you don't have much hassle doing it in the UI.
     
  4. Preza

    Preza MDL Novice

    Mar 19, 2014
    1
    0
    0
    Hey guys
    I'm having the same problem with Ethernet shortcut.
    I don't know anything about programming so I couldn't solve my problem with the solutions above.
    can anyone help me, please?
     
  5. Ming_the_Merciless

    Ming_the_Merciless MDL Member

    Feb 7, 2014
    138
    49
    10
    You don't have to program anything. buuuuuuu190 has provided the code for you in post 3 of this thread. All you need to do is:

    1 - open (run) notepad
    2 - copy code posted by buuuuuuu190 in post 3
    3 - paste into notepad
    4 - save file as a .bat (saving as ".bat.txt" won't work! - you can't use the notepad defaults - change "File type" from the default ".txt" to "any" to do this)

    You're done! You must run the file with elevated privileges (right-click and select "Run as administrator")