Last active
May 30, 2017 06:41
-
-
Save rwenz3l/aeedf8b2a2b72b3574787e429c7071f2 to your computer and use it in GitHub Desktop.
Toggle between two Gateways on Windows 7/8/10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set /p DUMMY=Press ENTER to Toggle Internet Gateways.. | |
CD %~dp0 | |
IF EXIST "%~dp0fast.ini" ( | |
ECHO Switch: Slow | |
route DELETE 0.0.0.0 MASK 0.0.0.0 192.168.10.6 | |
route ADD 0.0.0.0 MASK 0.0.0.0 192.168.10.5 | |
DEL Fast.ini | |
) ELSE ( | |
ECHO Switch: Fast | |
route ADD 0.0.0.0 MASK 0.0.0.0 192.168.10.6 | |
route DELETE 0.0.0.0 MASK 0.0.0.0 192.168.10.5 | |
COPY NUL "%~dp0fast.ini" | |
) | |
echo Toggled! | |
set /p DUMMY=Press ENTER to Close Window.. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment