Sleotiur29

Togglenetwork

Mar 20th, 2022 (edited)
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. netsh interface show interface "LAN" | findstr "Enabled" > nul
  3. if errorlevel 1 (goto WIRED) else (goto WIRELESS)
  4. :WIRED
  5. netsh interface set interface "WLAN" DISABLED
  6. netsh interface set interface "LAN" ENABLED
  7. goto END
  8. :WIRELESS
  9. netsh interface set interface "LAN" DISABLED
  10. netsh interface set interface "WLAN" ENABLED
  11. :END
Add Comment
Please, Sign In to add comment